Practical Linux Hardening(Part 1)

Hardening an operating system simply means making it more secure. In this post, I will be outlining three simple steps in hardening your Linux system, using basic Linux commands.

  • Applying the latest system updates Updating your operating system when needed can save you from a lot of headaches. Usually, new updates come with patches to secure the system from previously undetected threats. For this demonstration, I will be using an Ubuntu v20.04.3. To update the repository, we input the command sudo apt-get update -y
  • Applying latest system upgrades This simply requires the command sudo apt-get upgrade -y . This upgrades all the applications and services in the OS. The -y in this command simply exists to save time. As the command runs, you may be required to give permission which involves typing y for yes, and n for no. adding a 'y' to the command saves you from that stress. The 'sudo' in front helps you get admin privileges. All f these commands cannot be run by ordinary users! This upgrade may take a few minutes so prepare to be patient.
  • Configuring Automatic System Updates The first command to run is sudo apt install unattended-upgrades -y. Automatic updates keep your software updates, without you having to do it manually. Next, run the sudo dpkg-reconfigure unattended-upgrades -y

In the next post, we will be adding new users, disabling the root account of our ubuntu system, disabling common ports and services, and configuring host firewall.