Skip to content

Debian Linux Post Install Scripts #34

@practicalli-johnny

Description

@practicalli-johnny

Article title
Debian Linux Post Install Scripts

Article description or content
I use Debian Linux as there is a huge advantage to having a stable and low maintenance operating system. This allows me to focus and get more things done.

The constraint of a stable operating system is that some of the latest versions of development tools and programming languages may not be available as part of the distributions package manager.

Luckily it is relatively easy to script downloading and installing the latest development tools, especially with the help of the Download Release Artifacts (DRA) project or scripts provided by those tools.

Debian Packages

I created a simple bash script to add packages for tools and applications I commonly use.

The script reads a list of packages from a text file, making it very easy to maintain the list. I keep the list in alphabetic order so its easy to check which packages I've added.

The Debian Linux install adds a few packages that I do not wish to use, or have alternative package prefferences. For example, I remove Evolution as I do not need a local mail server. I also use LightDM rather than GDM3 for the GUI greeter and display manager.

Package Post Install Script

The post install script also reads a list of packages that I want to remove.

!!! EXAMPLE "Debian Linux Post Install Script"
```shell
#!/usr/bin/env bash

# Batch install Debian Linux packages used by Practicalli
# Skip packages if they are already installed

# NOTES:
# - apt-get backend used as features of apt UI not required for scripts

# Package lists to process
add="debian-linux-post-install-packages-add.list"
purge="debian-linux-post-install-packages-purge.list"

## Update available Debian packages
echo
echo "# ---------------------------------------"
echo Update available Debian packages
sudo apt update
echo "# ---------------------------------------"
echo

# Install additional Debian packages
while read -r line
do
  echo "# ---------------------------------------"
  echo Install "$line"
  sudo apt-get --yes --ignore-missing install "$line"
  echo "# ---------------------------------------"
done < "$add"
echo

echo "# ---------------------------------------"
echo Install System Clipboard tool - X11 or Wayland
./clipboard.sh
echo "# ---------------------------------------"
echo

echo "# ---------------------------------------"
echo Configure Kitty as default terminal
sudo update-alternatives --set x-terminal-emulator "/usr/bin/kitty"
echo "# ---------------------------------------"
echo

# Remove additional Debian packages
while read -r line
do
  echo
  echo "# ---------------------------------------"
  echo Purge "$line"
  echo "# ---------------------------------------"
  echo
  sudo apt-get purge --yes --ignore-missing "$line"
done < "$purge"
echo

echo "# ---------------------------------------"
echo Uninstall unnecessary Debian packages
sudo apt-get autopurge
echo "# ---------------------------------------"
echo

echo "# ---------------------------------------"
echo Remove Debian package files from cache
sudo apt-get clean
echo "# ---------------------------------------"
echo
```

But Arch Linux is Awesome

I have used 'rolling' distributions and spend 2025 testing out Arch Linux as an alternative operating system. The initial learning curve was not too steep and getting going only took a weekend. However, the maintenance burden was much greater and was a continual distraction.

Part of the maintenance was using Btrfs and Hyprland (which introduced lots of breaking changes). I did find some core aspects confusing, such as packman command options (and the docs around pacman). Using the AUR community repository I also found confusing, there are several tools to access AUR and it wasnt clear from the official docs to add these tools without first adding AUR (catch 22 scenario).

Usually the Arch Linux docs are very comprehensive, but can drowned the reader in options (some outdated) and yet not provide enough guidance or a clear and simple approach.

Creative Commons license
All ideas and content submitted should be copyright free. Submitted content will be used in any Practicalli works and distributed under a Creative Commons license to ensure that content remains freely available.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions