There is a new revision of this tutorial available for Ubuntu 16.04 (Xenial Xerus).

How to install a Ubuntu 16.04 (Xenial Xerus) Minimal Server

This tutorial shows the installation of a Ubuntu 16.04 minimal server in detail with many screenshots. The purpose of the guide is to show the basic installation of Ubuntu Xenial Xerus that can be used as a basis for the other Ubuntu tutorials here at howtoforge like our perfect server guides.

1. Requirements

To install a Ubuntu Server, you will need the following prerequisites:

2. Preliminary Note

In this tutorial I use the hostname with the IP address and the gateway These settings might differ for you, so you have to replace them where appropriate.

3. The Base System

Insert your Ubuntu install CD into your system and boot from it. When you install the OS in a virtual machine like I do it here, then you should be able to select the downloaded ISO file as source for the CD/DVD drive in VMWare and Virtualbox without burning it on CD first.

The first screen will show the language selector. Plese select your language:

Then choose the option Install Ubuntu Server:

Select your language again (?):

Then choose your location. The location settings are important for the keyboard layout, locale and timezone of your server:

Choose a keyboard layout: You have the option to let the Ubuntu installer detect the keyboard layout automatically by choosing "yes" here. I prefer to select the right keyboard from a list and therefore, I choose No & keyboard layout as German:

The installer checks the installation CD, your hardware, and configures the network with DHCP if there is a DHCP server in the network:

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

Ubuntu does not let you log in as root user directly. Therefore, we 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):

Choose a password

I don't need an encrypted private directory, so I choose No here:

Share this page:

11 Comment(s)

Add comment


From: thctlo at: 2016-04-22 11:38:49

Hai, Thanks, nice and clean.. But now you still have a "slow" responding ubuntu. Dont install the "Standaard system utilities", it safes disk space, and you system wil respond faster. Mostly due to "command-not-found" and the security notice at logon for example.When you use resolvconf  and you added : dns-nameservers do also add dns-domain and dns-search Notice, if both (domain and search)  are used the last in the config wins, so make sure dns-search is last and starts with your primary domain.

And i do advice to NOT use the login administrator.

If your using a server with samba4 (AD)  this wil conflict with the domain user Administrator. so my advice is name it something like nixadmin or sysadmin

And last, If you installed any mail tools at install, which happens also when you install the default utils. Dont forget to check /etc/mailname

Greetingz and Thanks for the nice howto again.

From: Lionel at: 2016-04-24 16:39:27

Hey, can you do one with Ubuntu minimal + LXQt

From: Saulo de Baco at: 2016-04-29 01:31:12

Hi there, when

echo server1 > /etc/hostname, then

# service hostname startFailed to start hostname.service: Unit hostname.service is masked.

Any idea? Tks.

From: Vic Silvano at: 2016-06-02 22:20:48


I am also encountered error when i run the 

# service hostname start

error: ERROR: Failed to start hostname.service: Unit hostname.service is masked.


Anyone who had an Idea?. 


From: till at: 2016-06-03 06:25:23

You can restart the server as alternative to apply the hostname.

From: Vic Silvano at: 2016-06-03 15:54:10

Hi Sir,

I follow all your instruction here . .but my question is how can i use this ISP config 3.1..what Mail that i will use? 

or these ISP are not yet have an webmail access?..

This error that i have encountered:

i type my login https://(My IP):8080/webmail

then error below:

Not Found

The requested URL /webmail was not found on this server.






From: Chales Witely at: 2016-06-09 21:29:12

I am getting a constant "Failed to restart hostname.service: Unite hostname.service is masked."


Unsure of what this is.


From: till at: 2016-06-10 06:49:17

Just reboot the server instead.

From: Liam at: 2016-06-16 18:54:53



This has been a very helpful tutorial, and I'm not sure if anyone has brought this up, but at the very end, the "Service hostname start" part, I get an error, "Failed to start hostname.service: Unit hostname.service is masked."

I went back and followed your process again, and still the same issue. I'm running Virtual Machine on iOS. Not sure if that makes a difference. I couldn't find any work arounds online either. Any ideas?

From: till at: 2016-06-17 06:56:27

Just restart the vm to apply the hostname.

From: lucas at: 2016-10-07 22:27:08

Great tut! I got all the way through it and when I ran 'service networking restart' it returned "Failed to start hostname.service: Unit hostname.service is masked."

Everything else worked as the tutorial described. I want to make sure this is working before i move forward. Thanks - L