Razzi's guide to debian
Debian is my operating system of choice for server-side development.
It’s used by the Wikimedia foundation and has strong principles (yet is pragmatic) and has a large and helpful community.
Here’s my guide for how I set up a debian machine for development right after my first login.
Set up passwordless sudo
Either I’m using a virtual machine or I set a strong password and disable password login over ssh, so I let myself sudo without typing a password.
To do this you edit the /etc/sudoers file, but you do this with visudo so that if you mess that file up you don’t brick your computer.
Run:
$ sudo visudo
It’ll open the nano editor. Like emacs, you can go to the next line with
C-n and the previous with C-p.
Look for this line near the bottom:
%sudo ALL=(ALL:ALL) ALL
Change it to:
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
Save with C-x, answer y to the prompt, and hit enter to confirm the filename.
Upgrade default packages
Since you’ll be installing from some .iso or virtual machine image,
and packages update constantly, you’ll want to upgrade all built-in packages to the latest.
Update your package index:
$ sudo apt update
Take a look at the upgradable packages (optional):
$ apt list --upgradable
Listing... Done
base-files/stable 12.4+deb12u4 amd64 [upgradable from: 12.4]
debian-archive-keyring/stable 2023.3+deb12u1 all [upgradable from: 2023.3]
...
Upgrade them:
$ sudo apt upgrade
Install the fish shell
I use the fish shell as my default interactive shell.
Install it and set it to your default shell:
$ sudo apt install -y fish
...
$ sudo chsh -s `which fish` `whoami`
Exec fish to use it in your current session:
$ exec fish
debugging a broken graphical desktop
Occasionally you may end up with a blinking cursor instead of your desktop (looks like an underscore).
If this happens, don’t panic! You can get a command line with the following keyboard shortcut:
ctrl+alt+f1
In fact you can do this any time you want to run a command without having to go through the graphical desktop.
In one case, I found an update had stopped partway through, and when I ran sudo apt full-upgrade it told me to run sudo dpkg --configure -a and then when the next update failed, sudo apt-get update --fix-missing. When this completed, I rebooted my computer and the graphical desktop was working again.
You can switch back from the text interface with ctrl+alt+f7.
source code
Debian is made of many packages, each having their own git repostory. The closest thing to a git repository for the project is the Debian Installer repository: https://salsa.debian.org/installer-team/d-i
More information about checking out the debian repositories is here: https://wiki.debian.org/DebianInstaller/CheckOut
You can also browse sources for debian packages in versioned folder form at https://sources.debian.org/.