You can turn off the Ubuntu Server ads
Thanks for not making it super hard!
FreeBSD fans may be sad to hear that I recently migrated my custom-built FreeBSD NAS to Ubuntu Server LTS1. This was because:
The bad news is that Ubuntu ships with ads on login:
The good news is that it’s easy to turn them off!
All these messages are written out by shell scripts in /etc/update-motd.d/
, and you can simply delete the shell scripts that output ads. I deleted 10-help-text
, 50-motd-news
, 90-updates-available
, 91-contract-ua-esm-status
. The one that checked for updates seemed useful, but ended with an ad, so I wrote my own replacement for it that didn’t do that.
$ cat 90-updates-available
#!/usr/bin/env bash
echo $(apt list --upgradable 2>/dev/null | grep -v '^Listing' | wc -l) updates available according to current apt db.
Note that good, well-behaved motd scripts should cache their output, but I’m lazy and don’t mind the half second delay my script causes. You can do better, if you feel like it.
And now logging in is much nicer:
-
Now, I much prefer Rocky Linux on most of my servers, but apparently the current ZFS-on-Linux kernel module for RHEL 9 doesn’t support a feature flag that my previous FreeBSD installation enabled. Ubuntu 24.04 had a newer module that worked with my existing ZFS pool. ↩︎
-
Jellyfin does not officially support FreeBSD, and the unofficial port won’t let me enable hardware acceleration. My poor old pre-Ryzen AMD APU is not up to software encoding as well as I would like. ↩︎
-
Writing a timer is much easier and more testable than writing a cron job, you can have multiple instances of the same service without much headache, and honestly it’s what I’m familiar with. Oh, and user services are great for running backup scripts without root access. I’m sure writing
rc.d
scripts is second nature to some folks, but it feels arcane to me. ↩︎