Ubuntu
show package version history
sudo apt-cache showpkg firefox 01
downgrade a package
apt-get install --reinstall --allow-downgrades <package-name>=<version> -y
lock package version
apt-mark hold <package-name>
Change password
passwd
initial server setup
More often than not I'm starting from the Ubuntu container template (CT) in Proxmox, so the following commands are assuming you're logged in as root. When starting from the Ubuntu ISO, the current user/password will probably be ubuntu. Either add sudo to the following commands or log in as root if that's the case.
Update packages
apt update && apt upgrade
Add new user
adduser <username>
Give new user privs.
usermod -aG sudo <username>
Logout and login as new user. (sudo will be required after this step)
logout
Remove the shell from root
sudo usermod -s /usr/sbin/nologin root
Disable root from logging in
sudo usermod -L root
Remove default ubuntu user (only if using the full Ubuntu ISO)
sudo userdel ubuntu
Set up UFW rules
sudo ufw default deny incoming
sudo ufw enable
Install ZSH
sudo apt install zsh
Set ZSH as default shell and logout/login
sudo chsh -s $(which zsh)
logout
Install Oh My ZSH
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
Change ZSH theme (I like cloud the best 🤷♀️)
sudo nano ~/.zshrc
Install tmux
sudo apt install tmux