Ubuntu LTS Set-Up

It is not every day that I have to set up a fresh install of Ubuntu, and I end up forgetting and having to repeat research on specific “tweaks”. I am now using this page as my own reference.

  • systemd-networkd
    • tired of those 120s boot delays while the network waits for DHCP?
    • following this fix:
      • sudo systemctl disable systemd-networkd-wait-online.service
      • sudo systemctl mask systemd-networkd-wait-online.service
    • also mark all unneeded interfaces as optional e.g. in /etc/netplan/nn-whatever.yaml:
      Netplan
    • to find out which services are impacted:
      • sudo systemctl show -p WantedBy network-online.target
  • repository maintenance
    • upgrading from old versions may have “remnant” repositories lurking around
      • show the what is in the encoded /etc/apt/trusted.gpg file: apt-key --list
        • manually remove individual entries (using the fingerprint): apt-key del "xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx"
      • check the sources in /etc/apt/sources.list.d
      • check the trusted sources in /etc/apt/trusted.gpg.d
      • check sources in /etc/apt/sources.list:
        • show what is in /etc/apt/sources.list: add-apt-repository --list
        • manually remove individual entries (using entire line): add-apt-repository --remove "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
  • fix broken/partial/stuck package installs
    • try any of the following in order:
      • sudo dpkg --configure -a
      • sudo apt-get install -f
      • delete pending actions: sudo rm -fr /var/lib/dpkg/updates/*