Damien Gonot

Linux

Homepage / Notes / Computer Science / Linux

Distributions

https://distrowatch.com/

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

https://zero-to-nix.com/

GNU Guix

Window Managers

herbstluftwm

spectrwm

exwm

Emacs-based window manager

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 vendor
  • KEK (Key Exchange Key): used to update db and dbx
  • db (Allowed): signatures of trusted bootloaders/kernels
  • dbx (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-state check if Secure Boot is enabled
  • mokutil --import your-key.der enroll a custom key
  • bootctl status (systemd-boot) show EFI/Secure Boot status

Package Managers

distro familytoolinstallupdatesearch
Debian/Ubuntuaptapt installapt upgradeapt search
Archpacmanpacman -Spacman -Syupacman -Ss
Arch (AUR)yay/paruyay -Syay -Syuyay -Ss
Fedora/RHELdnfdnf installdnf upgradednf search
openSUSEzypperzypper installzypper updatezypper search
NixOSnixnix-env -iAnixos-rebuildnix search
Guixguixguix installguix pullguix search

Desktop Environments

Gnome

Shortcuts

Alt + Space: show window menu (to activate Picture-in-Picture for example)

KDE