Clean Linux Install
These notes are a brief guide for installing Linux fresh on a new machine.
An assumption is made that a ‘friendly’ distro is being used that comes with a lot already set up, including a desktop environment etc. with these commands being more of a focus of getting everything needed for use in a working environment.
Here we assume openSUSE with the zypper package manager, but
distro-specific commands could be adapted.
- Install from bootable USB
- Set hostname
1sudo hostnamectl set-hostname <myname> - Set up keys
- Set up SSH key
1ssh-keygen- To allow access to another machine copy the contents of
~/.ssh/id_<type>.pubon this machine to~/.ssh/authorized_keyson the remote.
- To allow access to another machine copy the contents of
- Set up GPG key
1gpg --full-generate-key- To use on another machine run:
and then on the other machine:
1 2 3gpg --export-secret-keys --armor <FINGERPRINT> > ~/gpg-secret.asc gpg --export-ownertrust > ~/gpg-trust.txt scp ~/gpg-secret.asc ~/gpg-trust.txt <remote-machine>:~/1 2 3gpg --import gpg-secret.asc gpg --import-ownertrust gpg-trust.txt gpg --list-secret-keys
- To use on another machine run:
- Consider adding these to relevant places, e.g. other machines and Git platforms.
- Set up SSH key
- Update and install packages
- Check to make sure there isn’t a repo left over from the bootable USB:
If there is then remove with
1zypper lr -usudo zypper removerepo <name> - Refresh and update all packages:
1 2sudo zypper ref sudo zypper dup - Install useful developer packages:
Get Rust from Rust, rather than zypper, to match their directory layout and recommendations:
1 2 3 4sudo zypper install -t pattern devel_basis sudo zypper install cmake sudo zypper install python313-devel sudo zypper install glib2-devel1curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - Install other software:
1 2 3 4 5sudo zypper install gcc-fortran sudo zypper install uv sudo zypper install wezterm sudo zypper install helix sudo zypper install powerline
- Check to make sure there isn’t a repo left over from the bootable USB:
- Set
gitconfig in~/.gitconfig:1 2 3 4 5[user] name = <NAME> email = <EMAIL> [commit] gpgsign = true - Install password-store:
1 2sudo zypper install password-store git clone <password-store-location> ~/.password-store - Get preferred font
- Download zip from
- Unzip and add to cached fonts:
1 2unzip -o ~/Downloads/MapleMono-TTF.zip -d ~/.local/share/fonts/MapleMono fc-cache -fv
- Fetch dotfiles from
github.com/jatkinson1000/dotfiles
- Add SSH (and GPG) key to GitHub profile if using a new one.
- run:
1curl -s https://raw.githubusercontent.com/jatkinson1000/dotfiles/refs/heads/main/.dotfiles/dotfiles_install.sh | bash - Create a new branch for this machine if required (check if anything was backed up).
- Teams and Slack via
flatpak:1 2flatpak install flathub com.slack.Slack flatpak install flathub com.github.IsmaelMartinez.teams_for_linux - Get eduroam access
- Download the eduroam installer from
- From a virtual environment run:
and enter the eduroam access key and password generated at
1 2python3 -m pip install dbus-python python3 ~/Downloads/eduroam-linux-UoC-eduroam_public_CA.py - Once complete remove the virtual environment.
- Other notes:
- Check volume and brightness keys, may be function locked.
Cambridge VPN (UIS VPN)
- Install the strongSwan NetworkManager plugin:
1sudo zypper install strongswan NetworkManager-strongswan NetworkManager-applet-strongswan - Create a Network Access Token for this device at
tokens.uis.cam.ac.uk (username of the form
crsid+device@cam.ac.uk). - Configure the connection (KDE Plasma) via
System Settings -> WiFi & Networking ->
+(add) -> IPsec based VPN (strongswan)- Use the following settings:
- Gateway:
vpn.uis.cam.ac.uk - Authentication: EAP
- Username and Password: From network token
- Request an inner IP address: Yes
- CA certificate: Leave unset
- Gateway:
- Use the following settings:
- You can then ‘select’ this as a network connection (password required)
- See the
for further details.