blog posts

Ubuntu Linux Server Installation

Linux Server

Without a doubt, when setting up an Ubuntu Linux server, you need to do some basic setup in a few steps. These settings increase the security and performance of your server and provide a secure infrastructure for the next steps you want to take on the server. In this tutorial from DED9, we will discuss the basic setup settings for installing the Ubuntu Linux server operating system.

Prerequisite for installing Ubuntu Linux Server

  • Above all, an Ubuntu 18.04 Linux server
  • Then, server access profile: If you have access to your remote server such as SSH, you must have the IP address of the server and the username and password of the server to connect to the server. If you have direct access to the server, you must also have a username and password.

Setting up a Linux server


You can use several methods to enter the server:

  • First, if you have direct access to the server, you can enter your username and password with the server console and log in to the server.
  • The second method is a remote connection, which is mainly done via SSH, and you can do it with syntax or using tools. In this case, you can connect to the server environment and it is not a graphical environment(you can activate the X environment using graphical commands and enter it, which we do not recommend). There are many tools for SSH communication, the most famous of which is PUTTY.
  • The third method is to connect graphically and GUI tools, the most famous of which is VNC, which is a popular open-source program. Moreover, the Linux Ubuntu server version does not have a graphical environment by default, you either have to install the desktop version or install a graphical environment for it.

Whichever way you connect to the server, you must have a username and password for authentication and access leveling.

User with superuser access or non-root user

As you know, the root user in Linux operating systems is the root user and the main user who has the highest level of superuser access and is equivalent to the Administrator user in Windows operating systems. After that, For extra security, admins disable users by default on Ubuntu Linux OS version 12 for remote connection and login. Generally, when installing an Ubuntu server, you must specify a username and password other than root.

Note: By default, you cannot log in with the root user when logging in to the server, either with an SSH remote connection or with direct access to the Console, and must log in with the user-created during installation.

Add new command

To add a new user to Linux in all the different distributions, we use the adduser command to do this. To add a user to the john name, do the following:

$ sudo adduser john                                                                       

After executing this command, you must enter a password for this username. Note the star character * password and the dot. Not be. In addition, to grant this permission to this user, we must make this user a member of the sudo group.

We can do this with the supermod command and aG-options:

$ sudo supermod -aG sudo john

You can now go to the new user with the su command:

$ sudo su john                                                                            

Setting up a Basic Firewall

Uncomplicated Firewall is a very simple tool that already is installed on Ubuntu by default. This tool, like Iptables and other tools, works on IP Filter Tables.

The ufw tool is disabled by default and you must enable it first:

$ sudo ufw enable                                                                        

After activating ufw we should see a report of the roles Rules available:

$ sudo ufw status verbose                                                                

Output :                                                                                 

Status: active                                                                           

Logging: on (low)                                                                        

Default: deny (incoming), allow (outgoing), disabled (routed)                           

New profiles: skip                                                                       

Check Timezone system time setting

When installing the Ubuntu Linux operating system in all versions, you must specify the time zone. Then, after which, if the system is connected to the Internet, it automatically connects to the servers providing its own NTP time protocol, and according to the specified time zone, the system time Adjusts.