Linux
Homepage / Notes / Computer Science / Linux
Distributions
Debian
Stable, popular for servers
Arch Linux
Fedora
openSUSE
Tumbleweed
Rolling release of openSUSE
Gentoo
Have to compile from source
Handbook
https://wiki.gentoo.org/wiki/Handbook:AMD64
NixOS
NixOps
Nix Flakes
https://nixos.wiki/wiki/Flakes
Nix -> Dockerfile Nix Flakes -> Docker Compose
Resources
GNU Guix
Window Managers
herbstluftwm
spectrwm
exwm
Emacs-based window manager
- System Crafters: https://www.youtube.com/watch?v=f7xB2fFk1tQ
- DistroTube: https://www.youtube.com/watch?v=MquoGuU8sHM
XMonad
- Launch terminal: Shift-Mod-Enter
- Cycle through window arrangement: Mod-Space
- Go to workspace n (1-9): Mod-n
StumpWM
niri
https://github.com/YaLTeR/niri
A scrollable-tiling Wayland compositor.
Boot
EFI / UEFI
UEFI (Unified Extensible Firmware Interface) replaced BIOS as the firmware standard. Stores boot entries in NVRAM. Boot manager selects which bootloader (e.g. GRUB, systemd-boot) to run.
EFI System Partition (ESP): a FAT32 partition (usually /boot/efi or /boot) where bootloaders and kernel images are stored. Mounted at boot time by the firmware.
Secure Boot
Secure Boot verifies that bootloader and kernel are signed with trusted keys before executing them. Prevents bootkits and unauthorized OS loading.
Keys:
PK(Platform Key): root of trust, owned by hardware vendorKEK(Key Exchange Key): used to updatedbanddbxdb(Allowed): signatures of trusted bootloaders/kernelsdbx(Forbidden): revoked signatures
Most distros ship with a shim signed by Microsoft's key, which then verifies the distro's own key. Custom kernels require enrolling your own key (mokutil).
Useful commands:
mokutil --sb-statecheck if Secure Boot is enabledmokutil --import your-key.derenroll a custom keybootctl status(systemd-boot) show EFI/Secure Boot status
Package Managers
| distro family | tool | install | update | search |
|---|---|---|---|---|
| Debian/Ubuntu | apt | apt install | apt upgrade | apt search |
| Arch | pacman | pacman -S | pacman -Syu | pacman -Ss |
| Arch (AUR) | yay/paru | yay -S | yay -Syu | yay -Ss |
| Fedora/RHEL | dnf | dnf install | dnf upgrade | dnf search |
| openSUSE | zypper | zypper install | zypper update | zypper search |
| NixOS | nix | nix-env -iA | nixos-rebuild | nix search |
| Guix | guix | guix install | guix pull | guix search |
Desktop Environments
Gnome
Shortcuts
Alt + Space: show window menu (to activate Picture-in-Picture for example)