Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Things To Do After Installing Debian 9

Below are some things that you probably want to do right after installing Debian 9 server. I'm glad to see that some of the steps for things to do after Installing Debian 8.0 are now no longer needed.

Configure Mirror

If you installed from the CDs and did not set up the mirror, then you will need to configure debian to use a mirror for updates.

su  
rm /etc/apt/sources.list  
editor /etc/apt/sources.list  

Fill the file with the following (taken from here):

deb  http://deb.debian.org/debian stretch main
deb-src  http://deb.debian.org/debian stretch main

deb  http://deb.debian.org/debian stretch-updates main
deb-src  http://deb.debian.org/debian stretch-updates main

deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main

Alternatively, use the UK mirror as follows:

deb http://ftp.uk.debian.org/debian stretch main
deb-src http://ftp.uk.debian.org/debian stretch main

deb http://ftp.uk.debian.org/debian stretch-updates main
deb-src http://ftp.uk.debian.org/debian stretch-updates main

deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main

Configure Sudo

Login as root and install sudo

su  
apt-get install sudo  

Now add your subuser to sudo users and use that user from now on.

adduser $MY_SUBUSER sudo  

Update

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

Install SSH

sudo apt-get install ssh

Install VIM

sudo apt-get install vim -y  

Set VIM to be the default editor (crontab)

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

"Fix" Vim Pasting

Refer here.

Enable Syntax Highlighting In Vim

Instructions are here.

Install ifconfig

sudo apt-get install net-tools -y
echo 'export PATH="$PATH:/sbin"' >> $HOME/.bashrc  

Then log out and in again.

Install byobu

sudo apt-get install byobu -y  

Other Packages

Finally, here is a list of system monitoring packages I like to install to make my life easier:

sudo apt install sysstat ncdu htop nload pydf iotop -y

References

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