Things to Do on a Fresh Ubuntu 20.04 Server Install

This guide is meant to recommend things you ought to do on a fresh ubuntu server install. These include securing the server and configuring it with the best practices.

Update the system

First things first - check if your machine is running the latest components and features provided

1
2
sudo apt update
sudo apt upgrade -y

Install common software packages

1
2
3
4
5
6
sudo apt install -y \
    vim \
    telnet \
    htop \
    wget \
    unzip

Set hostname

1
sudo hostnamectl set-hostname ${HOSTNAME}

Enable Firewall

UFW is the built-in Firewall for Ubuntu and it is highly reliable one. By default it is not enabled and you have to enable it manually. Simply follow these steps to enable it on your Ubuntu.

To Enable

1
sudo ufw enable

To Manage it in GUI

1
sudo apt-get install gufw

To Disable

1
sudo ufw disable

Configure timezone

Set up the server timezone

Get a list of timezones with this:

1
timedatectl list-timezones

Set your timezone with this command replacing Asia/Dubai with your timezone

1
timedatectl set-timezone Asia/Dubai

Typing this command timedatectl will display timezone display timezone details

1
2
3
4
5
6
7
8
$ timedatectl
                   Local time: Thu 2021-08-05 06:58:44 UTC
               Universal time: Thu 2021-08-05 06:58:44 UTC
                     RTC time: Thu 2021-08-05 06:58:44
                    Time zone: UTC (UTC, +0000)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: no

Create a sudo user

1
sudo adduser user

You will be prompted to enter user info and details Add user to sudo

sudo usermod -aG sudo user
comments powered by Disqus
Citizix Ltd
Built with Hugo
Theme Stack designed by Jimmy