Linux Machine Setup (Arch Linux)

Please be aware that you should be replacing the word user with your actual desired username everytime you see it in the scripts.

Update and installing software

this all assumes a ‘arch-like’ Linux such as arch-linux, cachy or garuda and other such derivatives.

pacman -Syu
pacman -S sudo zsh tmux byobu emacs-nox mc curl wget fastfetch lolcat git htop

in case of Proxmox guests we also need to install the qemu-guest-agent and spice-vdagent.

pacman -S qemu-guest-agent spice-vdagent

make sure your user has sudo privileges

usermod -s /usr/bin/zsh -aG sudo user

Securing ‘root’ user

sudo usermod -L root

this locks the root user account and prevents login attempts against it

probably time to reboot as-well

reboot

First login

simply hit either ‘0’ or ‘q’ to not worry about zsh config

Oh My Zsh Install

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
omz theme set bira
omz plugin enable git sudo extract command-not-found

Note : Should the prompt look a little funny you may want to run sudo dpkg-reconfigure locales and select you favorite brand of locale (like “EN_gb.UTF-8”) and on the next screen make that your default, upon next login this will be fixed.

Emacs setup:

grab the contents of my example under My Emacs Setup and paste them into .emacs.d/init.el first emacs start will take a little while, during initialization of plugins through ELPA/MELPA

Final tweaks

finally a zsh tweak: add this

echo "[[ -f ~/.zshrc-personal ]] && . ~/.zshrc-personal" >> ~/.zshrc

to ~/.zshrc at the end.

And now for a little pizzaz

echo "alias cls=\"clear;neofetch|lolcat\"" >> ~/.zshrc-personal
echo "clear;neofetch|lolcat" >> ~/.zshrc-personal

That’s it, you should now have a running linux system ready to install whatever packages you want to.

At the very end you can if you so choose, enable password-less sudo via this:

sudo emacs /etc/sudoers.d/$USER

and then inserting the following line (hitting TAB whenever you see the <T> tag in this line)

user <T> ALL=(ALL) <T> NOPASSWD: ALL

Updating your machine

Once you are a “standard” user you should be updating your system (periodically) thusly:

pacman -Syu

Git settings

git config --global user.email "<email>"
git config --global user.name "<Your full name>"
git config --global init.defaultBranch main
git config --global pull.rebase false