Debian tips This note was created on 3/20/2023 This note was last edited on 5/29/2023 === Make yourself administrator === Add user to "sudo" group: $> su -l #> adduser *YOURUSER* sudo #> exit === Change language === > sudo dpkg-reconfigure locales === Upgrade to next major version === 1. Switch to console tty via Ctrl+Alt+F3 (the upgrade should be done on a text console, because your desktop environment could freeze during post-install/service restarts, leaving the system in a broken state). 2. Check held back packages and unhold, if needed: > sudo apt-mark showhold > sudo apt-mark unhold *pkg* 3. Install updates for current release: > sudo apt update > sudo apt upgrade > sudo apt full-upgrade > sudo apt --purge autoremove 4. Change Debian release name in sources.list, for example to migrate from Bullseye to Bookworm: ~~~ --- deb https://deb.debian.org/debian/ bullseye main contrib non-free --- deb https://security.debian.org/debian-security bullseye-security main contrib non-free --- deb https://deb.debian.org/debian/ bullseye-updates main contrib non-free +++ deb https://deb.debian.org/debian/ bookworm stable main contrib non-free non-free-firmware +++ deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +++ deb https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware ~~~ Alternatively, you can change all accurencies of "bullseye" to "bookworm" using sed: > sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list 5. Clean and update package lists: > sudo apt clean > sudo apt update 6. Perform the major release upgrade, removing packages if required: > sudo apt upgrade > sudo apt full-upgrade > sudo apt autoremove 7. Reboot your system: > sudo systemctl reboot 8. Now check the output of "uname -a ; lsb_release -a" and you should see info about the upgraded system. === Install non-free Nvidia driver === 1. Make sure, that "non-free" and "non-free-firmware" are included in your "/etc/apt/sources.list". 2. Install driver and control panel: > sudo apt install nvidia-driver nvidia-settings === Install / Reinstall DE === > sudo tasksel === Update GRUB config === If you want to add Windows entry to yout GRUB, first you'll need to install and enable OS Prober: 1. Install "os-prober": > sudo apt install os-prober 2. To enable OS Prober: add/uncomment/change the following line in "/etc/default/grub" configuration file: ~~~ GRUB_DISABLE_OS_PROBER=false ~~~ 3. Update GRUB config: > sudo update-grub2