Things To Do After Installing Debian 8
Here is a list of things I recommend doing after a fresh install of Debian 8.
Related Posts
Things To Do
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://httpredir.debian.org/debian jessie main deb-src http://httpredir.debian.org/debian jessie main deb http://httpredir.debian.org/debian jessie-updates main deb-src http://httpredir.debian.org/debian jessie-updates main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/updates main
Alternatively, use the UK mirror as follows:
deb http://ftp.uk.debian.org/debian jessie main deb-src http://ftp.uk.debian.org/debian jessie main deb http://ftp.uk.debian.org/debian jessie-updates main deb-src http://ftp.uk.debian.org/debian jessie-updates main deb http://security.debian.org/ jessie/updates main deb-src http://security.debian.org/ jessie/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
Disable root login
SEARCH="PermitRootLogin yes" REPLACE="PermitRootLogin no" FILEPATH="/etc/ssh/sshd_config" sudo sed -i "s;$SEARCH;$REPLACE;" $FILEPATH # Restart the openssh service for changes to take effect. sudo service ssh restart
Install VIM
sudo apt-get install vim -y
Then enable syntax highlighting.
Set VIM to be the default editor (crontab)
echo 'export EDITOR=vim' >> $HOME/.bashrc sudo update-alternatives --config editor
Add ifconfig to your PATH.
echo 'export PATH="$PATH:/sbin"' >> $HOME/.bashrc
Install byobu
sudo apt-get install byobu -y
Killall
Debian doesn't come with the killall
command by default. You can install it with the psmisc
package.
sudo apt-get install psmisc
SSH Exit Cleanly
The systemd system in debian does not close ssh connections before powering off, which can leave your terminal hanging when you send the poweroff of restart commands. Resolve this here.