- Download OS: https://manjaro.org/
- linux: Manjaro XFCE
- kernel: 6.1
- iso: minimal
- image:
manjaro-xfce-22.0.5-minimal-230316-linux61.iso
- Create a bootable USB
- Install:
- swap (memory: Do I Need Swap)
- boot (500 MiB)
- /
- home
- Updating, system processing, cleaning
- Package management
- Preliminary steps
- Software installation
- Package managers tooling
- Fonts
- Console environment
- SSH
- Programming
- Code editors
- Engineering
- Desktoping
- Hardware
- Run OS in terminal mode
- Setup graphics
To disable system updates:
Applications
>>Settings
>>Add/Remove Software
>>Preferences
- turn off Check for updates
To run something via console call it Ctrl + Alt + T
and try to enter this:
sudo pacman -S xfce4-notes-plugin
xfce4-notes
Use htop
in terminal or kill PID
to manage running processes:
List packages:
ls /var/cache/pacman/pkg/ | less
Remove all pkg except those installed:
sudo pacman -Sc
Remove all files from pkg cache:
sudo pacman -Scc
List of mounted partitions:
sudo fdisk -l
sudo lsblk
Type the command to write the OS image, where /sdc
is the target flash drive:
sudo dd bs=4M if=/home/operator/Downloads/manjaro.iso of=/dev/sdc status=progress oflag=sync
Use Add/Remove Software
to install the package you are looking for.
Installing packet:
sudo pacman -S <packet>
Removing:
sudo pacman -R <packet>
Find:
sudo pacman -Ss <packet>
sudo pacman -Rs <packet>
Set prerequisites:
sudo pacman -S base-devel
Algorithm:
git clone https://packet.git && cd <packet> && makepkg -si
Update env:
sudo pacman -Syu
Customize your desktop:
Remove some programs if they are not needed, included in the minimal
build:
- Evince (evince)
- Midori Web Browser (midori)
- Parole (parole)
sudo pacman -R evince midori parole
Remove XFCE specific dotted UI artifacts:
touch ~/.config/gtk-3.0/gtk.css
echo "/* Remove dotted lines from GTK 3 applications */
undershoot.top, undershoot.right, undershoot.bottom, undershoot.left { background-image: none; }" >> ~/.config/gtk-3.0/gtk.css
sudo pacman -S telegram-desktop
sudo pacman -S firefox
sudo pacman -S brave-browser
sudo pacman -S thunderbird
sudo pacman -S onlyoffice-desktopeditors
sudo pacman -S xreader
To read docs in .fb2
or .epub
extenstions:
sudo pacman -S foliate
sudo pacman -S galculator xorg-xcalc
sudo pacman -S audacious
sudo pacman -S vlc
sudo pacman -S ristretto
sudo pacman -S pinta
Add/remove software using yay
, snapd
or pamac
.
Check:
cat /etc/pamac.conf | grep EnableAUR
Enable AUR
:
sudo sed -Ei '/EnableAUR/s/^#//' /etc/pamac.conf
Usage:
pamac list
pamac [search, build, install, remove] <packet>
Updates:
pamac checkupdates -a
pamac upgrade -a
sudo pacman -S yay
# Install
yay -S <packet>
# Remove
yay -Rns <packet>
# Update
yay -Syu
# Find
yay <packet>
Installing:
sudo pacman -S snapd
sudo ln -s /var/lib/snapd/snap /snap
Usage:
sudo snap [install, remove, find, refresh] <packet>
snap list
sudo snap refresh
sudo pacman -S otf-latin-modern
pamac install otf-ibm-plex
Times New Roman etc:
pamac install ttf-ms-fonts
sudo pacman -S ttf-jetbrains-mono
sudo pacman -S gnu-free-fonts
Using in LaTeX
as math font with Times New Roman
:
pamac install otf-xits
sudo pacman -S ttf-input
Terminal command line setup:
echo "export PS1='\[\033[01;32m\][\u\[\033[01;37m\] \W\[\033[01;32m\]]#\[\033[00m\] '" >> ~/.bashrc
Vim-based text editor:
sudo pacman -S neovim
Install clipboard provider:
sudo pacman -S xclip
Settings:
mkdir ~/.config/nvim && touch ~/.config/nvim/init.vim
echo "set clipboard=unnamedplus" >> ~/.config/nvim/init.vim
Setup GitHub
color scheme:
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
echo "
call plug#begin()
Plug 'projekt0n/github-nvim-theme'
call plug#end()
colorscheme github_dark_colorblind
" >> ~/.config/nvim/init.vim
:PlugInstall
- github_dark
- github_dark_dimmed
- github_dark_high_contrast
- github_dark_colorblind
- github_dark_tritanopia
- github_light
- github_light_colorblind
- github_light_tritanopia
Link: Github's Neovim themes
Terminal multiplexor:
sudo pacman -S tmux
Set up:
mkdir ~/.config/tmux
touch ~/.config/tmux/tmux.conf
echo "
set -g mouse on
" >> ~/.config/tmux/tmux.conf
Usage:
# Create a new session
tmux new-session
# Create a new session detached
tmux new-session -d
# Create a new session and name it
tmux new-session -s me
# Create a new named session and attach to it if one exists
tmux new-session -As me
# Add horizontal window
tmux split-window -vf
# Add vertical window
tmux split-window -hf
# Quit session
exit
Console code-preview utility:
sudo pacman -S bat
Usage:
bat file
Terminal emulator:
sudo pacman -S alacritty
Set up:
mkdir ~/.config/alacritty
touch ~/.config/alacritty/alacritty.yml
Cross-platform file manager:
sudo pacman -S mc
- Set default theme:
mc >> F9 >> Option >> Apperance >>
- modarin256-defbg
- To use nvim in mc:
mc >> F9 >> Option >> Configuration >>
- use internal edit
echo "alias mcn='EDITOR=nvim mc'" >> ~/.bashrc
Link: Connecting to GitHub with SSH
Set up git
:
git config --global user.name "Name Surname"
git config --global user.email operator@unix.git
git config --global init.defaultBranch main
Prepare ssh
dir:
mkdir ~/.ssh && cd ~/.ssh && touch config
Example config
with required configuration:
echo "Host github.com
IdentityFile ~/.ssh/github/id_ed25519" >> config
Verify SSH:
eval "$(ssh-agent -s)"
Generate key:
ssh-keygen -t ed25519 -C "operator@unix.git"
Copy to clipboard, paste on Github:
cat id_ed25519.pub | xclip -selection clipboard
Move keys to directory:
sudo mkdir github && sudo mv id_ed25519 id_ed25519.pub github
Check connection:
ssh-add ~/.ssh/github/id_ed25519 && ssh -T git@github.com
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env" && rustc -V
sudo pacman -S deno && deno upgrade
cargo install deno --locked
curl -fsSL https://deno.land/x/install/install.sh | sh
sudo pacman -S nodejs npm && node -v
# Package update utility
sudo npm install -g npm-check-updates
sudo pacman -S php && php -v
Install pip
into the system python:
sudo pacman -S python-pip
Upgrade pip
if it needs:
pip install --upgrade pip
Download and install vendor libs:
pip install numpy sympy scipy pandas matplotlib tensorflow jupyterlab handcalcs qiskit qutip pymedphys[user] pylint black black[jupyter] clang-format psycopg[binary] psycopg[pool] pyqt6 flask
Reinstall:
pip install --upgrade --no-deps --force-reinstall <packet>
cd ~ && mkdir .python && cd .python
Download packet:
sudo wget https://www.python.org/ftp/python/3.11.3/Python-3.11.3.tgz
Unzip:
tar -xf Python-3.11.*.tgz && cd Python-3.11.*/
Run configurations:
./configure --prefix=/usr/local --enable-optimizations --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
Make optimization (by the number of cores):
make -j $(nproc)
Install:
sudo make altinstall
Add to PATH:
echo 'export PATH=/home/operator/.python/3.11.3/bin:$PATH' >> ~/.bashrc
Init glocal py-environment:
mkdir ~/.py &&
cd ~/.py &&
python -m venv env &&
. ./env/bin/activate &&
pip install <packets> &&
deactivate && cd ..
Usage:
echo '
function env() {
home=$( pwd )
cd ~/.py/env
python3 -m venv env && . ./env/bin/activate
cd $home
}' >> ~/.bashrc
echo '
function activate() {
python3 -m venv env && . ./env/bin/activate
}' >> ~/.bashrc
Deactivate virtual env:
deactivate
sudo pacman -S pyenv
Add commands to ~/.bashrc
by executing the following directives:
echo '
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
' >> ~/.bashrc
If you have ~/.profile
, ~/.bash_profile
or ~/.bash_login
, enter this:
echo '
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
' >> ~/.bash_profile
Restart your shell:
exec "$SHELL"
Usage:
pyenv install --list
Required base-devel
packet:
pyenv install 3.11.2 && pyenv global 3.11.2
pyenv global system
pyenv versions
pyenv exec python -m venv .venv
Compiler
sudo pacman -S ghc stack
Formatting tool
stack install hindent
Clash
sudo pacman -S clash-ghc
sudo pacman -S kotlin && kotlin -version
sudo pacman -S go && go version
sudo pacman -S docker
sudo systemctl start docker.service && sudo systemctl enable docker.service
Check:
sudo docker version
sudo docker info
Run Docker without root (reboot required):
sudo usermod -aG docker $USER
Hello world:
docker run hello-world
Docker compose:
sudo pacman -S docker-compose
# docker-compose -h
Usage:
# List
docker ps -a
# Removing
docker rm NAMES
docker rmi hello-world
# Monitoring
docker container ls
docker images
docker stats
docker network ls
sudo pacman -S postgresql
Run as postgres user:
sudo su postgres -l
Init:
initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data/' && exit
Configure Systemd:
sudo systemctl start postgresql.service && sudo systemctl enable postgresql.service && sudo systemctl status postgresql
New password for postgres user:
sudo passwd postgres
Run:
su - postgres
psql
Add a new db user (execute as postgres):
createuser --interactive -P
Step 1: Make the essential catalogs
sudo mkdir /var/lib/pgadmin && sudo mkdir /var/log/pgadmin
Step 2: Change the owner
sudo chown $USER /var/lib/pgadmin && sudo chown $USER /var/log/pgadmin
Step 3: Create the Python-based virtual environment and activate the env
mkdir ~/.db && cd .db && python3 -m venv pgadmin4 && source pgadmin4/bin/activate
Step 4: Install pgAdmin4
pip install pgadmin4
Step 5: Navigate to the pgAdmin4 and start the pgAdmin4 service
cd pgadmin4 && pgadmin4
# Open the browser and login:
https://127.0.0.1:5050/
- Login: operator@unix.pg
- Password: pgadmin
# Click on «Add New Server»
- Name: Database Server
# Connection
Host name/address: localhost
Port: 5432
Maintenance db: postgres
Username: operator
Add directive to .bashrc:
echo 'function pg() {
cd ~/.db/pgadmin4
python3 -m venv pgadmin4
source pgadmin4/bin/activate
pgadmin4
}' >> ~/.bashrc
pamac install vscodium-bin
- GitHub Theme
- GitHub Dark Colorblind
- Markdown Preview Enhanced
- Live Server
- LaTeX Workshop
- Atomize (Atom One Dark theme)
Used Full HD:
{
"update.mode": "none",
"files.eol": "\n",
"editor.smoothScrolling": true,
"workbench.startupEditor": "newUntitledFile",
"files.defaultLanguage": "markdown",
"editor.fontSize": 14,
"terminal.integrated.fontSize": 14,
"editor.lineHeight": 20,
"editor.tabSize": 4,
"editor.minimap.enabled": false,
"breadcrumbs.enabled": false,
"editor.folding": false,
"editor.glyphMargin": false,
"editor.parameterHints.enabled": false,
"editor.hover.enabled": false,
"explorer.confirmDelete": false,
"security.workspace.trust.enabled": false,
"editor.insertSpaces": false,
"editor.linkedEditing": true,
"editor.renderWhitespace": "selection",
"editor.unicodeHighlight.ambiguousCharacters": false,
"explorer.decorations.badges": false,
"explorer.decorations.colors": false,
"workbench.editor.decorations.colors": false,
"workbench.editor.decorations.badges": false,
"window.zoomLevel": 2,
"window.menuBarVisibility": "toggle",
"terminal.integrated.shellIntegration.decorationsEnabled": "never",
"workbench.colorTheme": "GitHub Dark Colorblind (Beta)"
}
sudo pacman -S intellij-idea-community-edition
Usage:
java --version
archlinux-java status
sudo archlinux-java set <target java package name>
sudo archlinux-java set java-19-jdk
sudo pacman -S pycharm-community-edition
pamac build codeblocks
sudo pacman -S texlive-meta texlive-doc
Formatting with latexindent
requires some Perl libraries:
sudo pacman -S perl-yaml-tiny perl-file-homedir perl-unicode-linebreak
latexindent --vversion
Usage:
latexmk -xelatex -synctex=1 -outdir=build main.tex
sudo pacman -S texstudio
XeLaTeX
settings for LaTeX Workshop
extension:
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-xelatex",
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOC%"
]
}
]
sudo pacman -S freecad
sudo pacman -S kicad && sudo pacman -S --asdeps kicad-library kicad-library-3d
pamac build scilab-bin
It can also be built from source:
git clone https://aur.archlinux.org/scilab-bin.git && cd scilab-bin && makepkg -si
Circuit simulator for Linux
pamac build circuitjs-bin
For microcontrollers
pamac build micropython
Similar to Matlab
application:
sudo pacman -S octave
pamac build drawio-desktop
Including Gimp
, for some technical graphical tasks this package may be needed:
pamac install inkscape
First, you need to install the packages virtualbox and linux*-virtualbox-host-modules. To list what kernels is installed use:
mhwd-kernel -li
The console will print itself the version of the kernel used by OS:
Currently running: 6.1.22-1-MANJARO (linux61)
The following kernels are installed in your system:
* linux61
Install modules for your current kernel:
sudo pacman -S virtualbox linux61-virtualbox-host-modules
Adding the vbox
module to your kernel: just reboot OS. To run VirtualBox immediately, type the following command:
sudo vboxreload && vboxmanage --version
In ordinary scenarios, there is no direct need for these applications, but still.
sudo pacman -S openshot
sudo pacman -S vokoscreen
sudo pacman -S screenkey
pamac build lingot
Tex symbols handbook based on AI tricks:
pamac build tex-match
Installing using snapd:
sudo snap install tex-match
sdcv
as a console translator:
sudo pacman -S sdcv
Create catalogs for your vocabularies:
sudo mkdir /usr/share/stardict && sudo mkdir /usr/share/stardict/dic
Copy/paste unpacked dicts:
sudo tar -xvjf yourdict.tar.bz2 -C /usr/share/stardict/dic
Usage:
sdcv cybernetics
echo 'function slovo() {
clear & sdcv "$@" --color
}' >> ~/.bashrc
slovo sun
GUI Dictionary
pamac build goldendict-git
Repeat the steps as above to unpack the voice-over dictionary, for example:
sudo mkdir /usr/share/goldendict/dic
sudo unzip WAV-dict.zip -d /usr/share/goldendict/dic
pamac build freetube
Link: Kernels
GUI tool for driver management: Applications
>> Settings
>> Manjaro Settings Manager
Experiments can break something. Just boot into console mode to fix the issue:
Ctrl + Alt + F2
Link: Configure Graphics Cards
sudo mhwd -a [pci or usb] [free or nonfree] 0300
Detection and installation of the best available free driver for a pci-connected graphics card:
sudo mhwd -a pci free 0300
Identifying available drivers:
mhwd -l -d --pci
Identifying installed drivers:
mhwd -li -d --pci
inxi -G
Removing installed drivers:
sudo mhwd -r [pci or usb] [name of driver]
Installing:
sudo mhwd -i pci [name of driver]
To install the proprietary nvidia graphics card driver:
sudo mhwd -i pci video-nvidia
To force the re-installation of an existing driver without removing it first:
sudo mhwd -f -i pci [name of driver]
If your hardware includes more than one GPU card, you can use PRIME technology to run applications on one or another video card.
Launch app using a discrete card:
DRI_PRIME=1 freecad
Run the application using the video chip built into the processor:
DRI_PRIME=0 freecad
If you want to always run something with a discrete video chip, you can copy the configuration .desktop
file to ~/.local/share/applications/
and edit the "Exec"
property:
Exec=DRI_PRIME=1 freecad
Link: [HowTo] get legacy 340xx NVIDIA drivers back