Configuring Debian post-update
Debian Stable has been my go-to distro for several years now. If I dislike anything about it, it’s the frequent updates đ Jokes aside, it’s a distro that matches my needs, and — more importantly — that I’ve gotten used to.
Besides a couple of laptops for myself, I’m also administering a few additional machines for my kids. Every now and then, I end up doing a fresh install for one reason or another. It’s always a bit of work.
This cries out for automation. So I finally sat down with an AI tool1 and had it build a script to take care of the usual post-install steps.
This script does the following things:
- Run a system update (apt update, apt upgrade)
- Enable non-free repos
- Download and install the iwlwifi firmware package. I typically buy used ThinkPads, and this gets the wifi going.
- Install proprietary codecs, so that the user can watch Netflix
- Set up a weekly cron job to clean out logs and such. Otherwise Debian tends to slowly fill up its hard drive.
- Set permissions for ssh, so that the user can use it
- [optional] Configure a few custom keyboard settings for Gnome. Specifically, make CapsLock an additional Ctrl key; ensure that both German and US keyboard layouts are available, and use Win+Space to switch between them; and set a keyboard shortcut so that I can open a terminal by pressing Ctrl+PgUp.
If you feel that this sort of thing might be helpful, here’s the script. Download the zip file, unzip it, run chmod +x debian_setup.sh, and then run sudo ./debian_setup.sh . That should pretty much do it.
If something doesn’t work as desired, please let me know.
- Justification: I can’t code, and based on 20 years of unsuccessfully trying to write shell scripts, I can confidently say that I would never have gotten this to work by myself. âŠī¸