Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 9 - Base Package Installation Script

After a fresh install of Debian 9 Mate, this is the first script I run to install all of the basic packages before running any manual customizations. It's here for the next time I re-install the OS.

I deliberately separated out the packages into commented chunks so that the script can be easily edited to your preferences. E.g you may use a different music player to rhythmbox. It also lets you know what the package is for which isn't always obvious from the name.

#!/bin/bash

# update
sudo apt-get update
sudo apt dist-upgrade -y

# Install extra mate stuff
sudo apt install -y mate-desktop-environment-extras

# Install byobu for terminal session management
sudo apt install -y byobu

# Install our favourite file browsers
# nautilus sucks with the lack of type-ahead now
sudo apt install -y thunar nemo

# Install shutter (and its necessary helper packages)
# for better screenshot management
# you'll have to manually set keyboard shortcuts
sudo apt install -y shutter gnome-web-photo libimage-exiftool-perl

# Install our video players
sudo apt install -y mpv vlc

# Install our music player
sudo apt install -y rhythmbox

# Install inkscape for when we need to edit/create
# SVG icons
sudo apt install -y inkscape

# Install tool for easily installing fonts from google
sudo apt install -y typecatcher

# Install some text editors
sudo apt install -y gedit leafpad

# Istall Atom editor
wget https://atom.io/download/deb -O atom.deb
sudo dpkg -i atom.deb
rm atom.deb

# Install helpful monitoring tools
sudo apt install -y htop nload pydf sysstat ncdu

# Install thunderbird email client
sudo apt install -y thunderbird

# Install nfs-common so we can mount nfs shares
sudo apt install -y nfs-common 

# Install the terminator terminal. Great alternative to 
# having to use tmux to split a terminal into chunks
sudo apt install -y terminator

# Install dconf-editor for editing low level settings
sudo apt install -y dconf-editor

# Install synapse launcher
sudo apt install -y synapse

# Install preload to speed up things like launching synapse
#sudo apt install -y preload

# Install openvpn for VPN connections
sudo apt install -y openvpn

# Install dig tool for DNS querying
sudo apt install -y dnsutils

# Install our version control systems
sudo apt install -y git subversion

# Install rabbitvcs with nautilus for git/svn
# because it just works.
sudo apt install -y rabbitvcs-cli rabbitvcs-nautilus

# Install the tkdiff tool which is much faster than meld, but read-only
sudo apt install -y tkdiff

# Install ifconfig
sudo apt install -y net-tools

# Accept incoming SSH connections
sudo apt-get install openssh-server -y

# Install vim
sudo apt install -y vim

# Set vim as default editor
echo 'export EDITOR=vim' >> $HOME/.bashrc
sudo update-alternatives --config editor

# Fix vim pasting issue
echo "set mouse=" > .vimrc
sudo echo "set mouse=" | sudo tee -a /root/.vimrc

# vim - enable syntax highlighting
SEARCH='"syntax on'
REPLACE='syntax on'
FILEPATH="/etc/vim/vimrc"
sudo sed -i "s;$SEARCH;$REPLACE;" $FILEPATH

# Disable use of motherboard speaker beeping at you.
sudo modprobe -r pcspkr

# Install php packages
sudo apt install -y php7.0-cli php7.0-mysqlnd

# Install mysql client for connecting to remote databases
sudo apt install -y mysql-client

# Install expect for automated interaction with cli scripts
sudo apt install -y tcl-expect expect

Then:

Last updated: 9th May 2020
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch