Install Ubuntu Server 16.04 LTS

To install Ubuntu Server 16.04, first download the Ubuntu Server 16.04 LTS ISO file and create a bootable USB. If you do not know how to do this, refer to this guide about installing Ubuntu Server from USB (check the section “Create a Bootable USB Installer” in the post. If it is not accessible, check this pdf version). Once you have the bootable USB ready, pop it in and make your system boot from USB (through the System BIOS).

ATTN: Check my post about boot mode first before proceeding to the installation steps.

1: Select Ubuntu Installer Language

Install Ubuntu 16.04 Server – Installer Language

2: Install Ubuntu Server 16.04

Start Ubuntu Server Installation. Click on Install Ubuntu Server to continue. For normal installations, you do not have to mess with any of the advanced options.

3: Select Operating System Language

4: Select Server Location

This helps in determining timezone.

5: Keyboard Detection

6: Network configuration

if your network has two interfaces, if you are sure which one to use, just select one and try, if it says failure, then go back and select the other options.

Note that: if you encounter this error below, it might be the case: Ethernet cable was loose… Reinstalled the OS and it should work.

Network autoconfiguration failed Your network is probably not using the DHCP protocol. Alternatively, the DHCP server may be slow or some network hardware is not working properly. <Continue>

If the ethernet is for sure not loose, then it’s most probably the issue that I introduced in this post (change the boot mode to Legacy Boot (i.e., disable UEFI mode), Secure Boot Off.) Reinstall the OS after set the Boot mode and boot order, then you should see the this succeeded screen:)

7: Hostname

Enter the hostname of the system. In this example, my server is named, so I enter

8: Server User Fullname

provide a Fullname for the primary account. This is not the root (administrator) user but this user can temporarily gain admin privileges using the sudo command.

Ubuntu does not let you log in as root user directly. Therefore, create a new system user here for the initial login. I will create a user with the name Administrator and user name administrator (don’t use the user name admin as it is a reserved name on Ubuntu Linux):

9: Server Username

provide the login username for the primary account.

10: Server Password

Select a password for the user created above.

Make sure you set a strong password with a mix of upper case letters, lower case letters, numbers, and special characters.

11: Home Directory Encryption

In general, you do not have to encrypt your home directory. But you may do so if you want to.

12: Confirm Timezone

The installer should automatically pick your timezone. Confirm the choice and move forward.

13: Ubuntu Server Drive Partitioning

This is one of the key steps and probably most complicated of all steps. For now, ensure that you have at least 8GB (headless – no desktop environment) or 10 GB (with desktop environment) of space. In this guide, assume that the server has 2 physical hard disks (sda and sdb). sda is the drive that will be formatted for Ubuntu Server 16.04 installation. sdb is a data storage drive (will not be formatted). Choose Manual partitioning method and proceed.

Primary partition vs. Logic partition

For Linux (Ubuntu), you need minimum TWO Partitions (Root and Swap). The recommended is to have 3 (Root, Swap and Home).
You you need to understand that it’s not possible to have more than 4 Primary Partitions, thus you need to create Extended Partition and inside that, you could have many other Logical Partitions.

If you are not familiar with partition, check this post: Manual Disk Partitioning Guide for Ubuntu Server Edition (pdf if the page is not accessible).

  • root partition (/). The bulk of the programs used for running the system will be installed here.
  • home partition (/home) the partition where your home directory will be located. In the course of using the system, files and folders you create will reside in various folders here
  • swap partition (swap): unformatted disk space for use as virtual memory. swap partition should be at least as big as your RAM size.

14: Confirm Partition Scheme

15: Write the Partitions to Disk

Because partitioning is critical, you will be asked one more time to confirm before partitions will be written to the hard disk.

16: Base Ubuntu 16.04 Server Installation

After partitioning, the installer continue to install Ubuntu Server 16.04 base system. Nothing to do here than wait for it to complete.

17: Setup HTTP Proxy

In typical Ubuntu Server setup, this is generally not needed. So, leave it blank and continue to install Ubuntu 16.04 Server.

Leave the HTTP proxy line empty unless you’re using a proxy server to connect to the Internet:

18: APT Repository Configuration

Ubuntu software are installed from the APT repository. Wait for the installer to configure it.

19: Setup Automatic Updates

Ubuntu Server can automatically install updates when they are available. While this can break things sometimes, installing just the security updates should be fine. So I recommend installing security updates automatically on your Ubuntu server.

20: Ubuntu Server Tasksel

After partitioning, this is the step that requires most user intervention. You will have to select what services you want to install on your Ubuntu 16.04 Server. “Standard System Utilities” should already be selected. In addition, there are some other server services you can install, for example, LAMP server, Samba file server, and OpenSSH Server.

LAMP server installs Apache web server, MySQL database server, and PHP. MySQL may be needed for running a dynamic website. Samba file server will allow you share files with Windows systems.  

OpenSSH will allow you to remotely connect and administer your Ubuntu Server through SSH.

The items I select here are OpenSSH Server and Standard System Utilities so that I can immediately connect to the system with SSH or an SSH client such as PuTTY after the installation has finished:

21: Ubuntu Server Installation

Ubuntu Server installer will continue to setup Ubuntu home server packages you selected in Tasksel. Nothing to do here than just wait.

22: Ubuntu Server Installation Continues

Once again, nothing much to do here. Let the installation continue.

23: GRUB Notification

Select Yes when you are asked Install the GRUB boot loader to the master boot record?

GRUB is the boot menu that is shown immediately after your Ubuntu Server powers on. It shows a list of all OSes installed on the system. It is installed to the hard drive containing the OS. In most cases this is /dev/sda.

24: Installing GRUB

As explained above, it is safe to install GRUB to /dev/sda. No input needed. Let the installer do its thing.

25: Finishing Ubuntu Server Installation

Again, nothing to do here. Let the installer finish a few things to complete setting up Ubuntu 16.04 LTS server.

The base system installation is now finished.

26: Reboot Ubuntu Server

Yah! you are done. After installation completes, hit continue to reboot server.

Note: If your Ubuntu Server 16.o4 LTS has Black Screen after reboot: 

Try pressing (simultaneosly) <Ctrl><Alt><F2> to see whether you can switch to different console

27: Ubuntu GRUB Menu

As explained above you will see the GRUB menu while booting. Nothing to do here. Your server will automatically boot to Ubuntu, which is the default setting.

28: First Login

When you are presented with the login screen enter the username and password you created earlier in the Ubuntu 16.04 Xenial Xerus installation process. Remember that Linux commandline does not show anything (asterisk) while typing passwords.

Now Login on the shell (or remotely by SSH) on the server as user “administrator”.

29: Ubuntu Server Headless Commandline

You should be on your Ubuntu Server commandline after successful login.

30: Get root Privileges

After the reboot, you can log in with your previously created username (e.g. administrator). Because we must run all the steps from this tutorial with root privileges, we can either prepend all commands in this tutorial with the string sudo, or we become root right now by typing:

sudo -s

(You can as well enable the root login by running)

sudo passwd root

And giving root a password. You can then directly log in as root, but this is frowned upon by the Ubuntu developers and community for various reasons. See

About Root

The root user is the administrative user in a Linux environment that has very broad privileges. Because of the heightened privileges of the root account, you are actually discouraged from using it on a regular basis. This is because part of the power inherent with the root account is the ability to make very destructive changes, even by accident.

The next step is to set up an alternative user account with a reduced scope of influence for day-to-day work.  It will tell you how to gain increased privileges during the times when you need them.

31: Create a New User

This example creates a new user called “sam”, but you should replace it with a username that you like:

adduser sam

You will be asked a few questions, starting with the account password.

Enter a strong password and, optionally, fill in any of the additional information if you would like. This is not required and you can just hit ENTER in any field you wish to skip.

32: Add root privileges to the new user you just created

Now, we have a new user account with regular account privileges. However, we may sometimes need to do administrative tasks.

To avoid having to log out of our normal user and log back in as the root account, we can set up what is known as “superuser” or root privileges for our normal account. This will allow our normal user to run commands with administrative privileges by putting the word sudo before each command.

To add these privileges to our new user, we need to add the new user to the “sudo” group. By default, on Ubuntu 16.04, users who belong to the “sudo” group are allowed to use the sudo command.

As root, run this command to add your new user to the sudo group (substitute the highlighted word with your new user):

  • usermod -aG sudo sammy

Now your user can run commands with superuser privileges! For more information about how this works, check out this sudoers tutorial.


33: Install the SSH Server (Optional)

If you did not select to install the OpenSSH Server during the system installation above, you could do it now:

apt-get install ssh openssh-server

From now on you can use an SSH client such as PuTTY on windows, and on mac and linux, you can ssh directly in your terminal by typing the command:

ssh your_account_name@yourserver_ip or

ssh your_account_name@hostname_of_yourserver


34: How to reboot the Server

Once you’ve installed Ubuntu Server you should make sure the server can boot properly. So type the following command at the prompt to reboot the server:

sudo reboot -h now

Once it’s rebooted and assuming everything’s working fine you’ll end up back at the command prompt. Now you can disconnect the keyboard and screen, but keep the Ethernet cable plugged in.

Note: If your Ubuntu Server 16.o4 LTS has Black Screen after reboot: 

Try pressing (simultaneosly) <Ctrl><Alt><F2> to see whether you can switch to different console

35: How to shutdown the Server with command line

Note: if you are using VNC to connect to your server, DO NOT SHUT DOWN your server through GUI, that would cause trouble. Instead, issue this command in your terminal to shut down the Ubuntu server.

sudo shutdown -h now

You can use the -P switch with shutdown to poweroff the computer.

sudo shutdown -P now

if you want to shut down forcefully, i.e., you don’t want to wait for processes to close normally? In that case you can use:

sudo poweroff -f


There are 35 steps to install Ubuntu 16.04 Server, most steps require no interaction from you. The whole installation can be done in less than 30 min (but this is the case when you are not encountering any errors while installation).


Posts referenced: 

Screenshot Guide: Install Ubuntu Server 16.04 LTS Xenial Xerus (

How to install a Ubuntu 16.10 (Yakkety Yak) Minimal Server (

Initial Server Setup with Ubuntu 16.04 (

How To Edit the Sudoers File on Ubuntu and CentOS (

How to install Ubuntu Server – Xenial Xerus 16.04LTS (

Installing Ubuntu Server for general use (

How to install Ubuntu server 16.04 and the Webmin GUI (

How to Install Ubuntu Server (

installing Ubuntu Server from USB  (

Linux: How to Install Ubuntu Linux Server 16.04 LTS (

Manual Disk Partitioning Guide for Ubuntu Server Edition

Choosing partition types for swap and root and choosing device for bootloader installation


Leave a Reply

Your email address will not be published. Required fields are marked *