Initial Server Setup with Ubuntu 20.04 LTS

Initial Server Setup with Ubuntu 20.04 LTS


First, you need to create a Ubuntu server and make some settings so that installed server is secure. In the following steps, a detailed description of the initial server setup with Ubuntu is given. At the time of writing Ubuntu 20.04 LTS was used.

Step 1: Login as root user

On windows, putty software is used to access your server, however, in Mac, or Linux based operating system you can use terminal to get access to your server.

Enter the root user and password which you set during setup. In Linux, the root user is the administrative user. This user has maximum privileges. Therefore, it is not same to use the root user on a regular basis. The root user can perform destructive changes even by chance.

Step 2: create a user account

This very first thing after installation of the server is to create a normal user. Following command is used to create user in Linux, keep in mind, after running this command details for the user will be asked such as password, full name and so on. It is your wish whether you fill that detail or not.

# adduser labotrees

Do not forget to change the username.

Step 3: Granting administrative access to user

The user created in the previous step cannot perform administrative tasks, therefore, it is important to assign administrative privileges to the user to that this user can run administrative commands using sudo. 

To assign administrative privileges run this command

# usermod -aG sudo labotrees

Do not forget to change the username.

Step 4: Setup basic firewall

UFW(Uncomlicated Firewall) firewall settings allow to make a server secure and can be accessed with secure connections. Applications which are installed on server register UFW profiles. To get a list of all registered UFW,

# ufw app list

Step 5: All SSH connections

To allow server to have SSH(Secure connections) run the following command

# ufw allow OpenSSH

Next step is to enable the ufw, this is done by

# ufw enable

To get the status of enabled firewalls on the server, this is done by

# ufw status

If you install any application on the server, you may need to make firewall settings to allow traffic in.


Leave a Comment

Your email address will not be published.

2 × 3 =