Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Things To Do After Installing Debian 10

Below are some things that you probably want to do right after installing Debian 10 server.

Install Sudo

Login as root and install sudo

su  
apt-get install sudo  

Replace Nano With Vim

Still as root, install vim and uninstall nano. Skip this step if you are a nano user instead.

apt-get install vim -y
apt-get remove nano -y

Fix Adduser

By default, the adduser command is located in the /usr/sbin folder of your system. For some reason this is not part of your path when you are root, so lets make sure it is in future.

echo 'export PATH="$PATH:/usr/sbin/"' >> /root/.bashrc

Now log out and in again for the change to take effect.

Add Yourself To Sudo Group

Now that you have adduser working, add yourself to the sudo user group.

adduser $MY_SUBUSER sudo  

Now log in as that subuser and do everything as them.

su $MY_SUBUSER

Update

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

Install SSH

sudo apt-get install ssh

Set VIM to be the default editor (crontab)

You only need to do this if you didn't uninstall nano.

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

Install byobu

sudo apt-get install byobu -y

Install BASH Completion And Command Not Found Packages

Install these packages to help you install packages through the use of tab-completion and when it finds that you entered an incorrect package name, suggesting the real one you may want.

sudo apt update \
  && sudo apt-get install command-not-found bash-completion -y \
  && sudo apt update \
  && sudo update-command-not-found

You may not see the effects until you log out and in again (SSH reconnect).

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

Speed Up Boot

You may wish to reduce the grub boot timeout to just 1 second to speed up reboots etc.

References

Last updated: 10th September 2024
First published: 8th May 2020

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