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

For some reason they now want you to hold down shift when right clicking to paste, otherwise you will go into :visual. To change this back run the commands below:

echo "set mouse=" > .vimrc
sudo echo "set mouse=" | sudo tee -a /root/.vimrc

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  

References