There is a new version of this tutorial available for Ubuntu 22.04 (Jammy Jellyfish).

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

This tutorial shows the installation of a Ubuntu 16.04 minimal server in detail with many screenshots. I will use the current release of the Ubuntu LTS (Long Term Support) series for this guide. The Ubuntu LTS versions are preferred by most administrators for server installations as you will get updates from Ubuntu for 5 years in the LTS branch.

If you like to get the latest software versions instead, then use this minimal server tutorial which installs the latest non-lts release, such releases get 9 months security updates only.

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 LTS 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:

Select the installation language

Then choose the option Install Ubuntu Server:

Choose to install Ubuntu Server

Select the language for the installed Operating System:

Select the language for the installed Operating System

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

Choose your country

Choose the world region

Choose the country

Choose locale settings

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:

Detect the Keyboard Layout

Select country origin of the keyboard

Choose the layout

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

The installer downloads packages

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

Ubuntu Network configuration

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 name for the User

Enter the username

Choose a password

Set the password

Repeat the password

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

Do not create an encrypted private directory

Share this page:

17 Comment(s)

Add comment

Please register in our forum first to comment.


By: thctlo

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.

By: Lionel

Hey, can you do one with Ubuntu minimal + LXQt

By: Saulo de Baco

Hi there, when

echo server1 > /etc/hostname, then

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

Any idea? Tks.

By: Vic Silvano


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?. 


By: till

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

By: Vic Silvano

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.






By: Chales Witely

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


Unsure of what this is.


By: till

Just reboot the server instead.

By: Liam



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?

By: till

Just restart the vm to apply the hostname.

By: lucas

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

By: chech

The title is misleading. This is by no means a minimal install, just a normal server install.

By: Renata

This aplication is useful when ubuntu alredy installed? I have doubts about use CD and make a system boot and lose my work documents there are in computer. Thanks by your attention. Forgive my bad english rsrsrs

By: till

This document describes how to install a new Ubuntu server. This tutorial is not the right one for you if you have already Ubuntu installed :)

By: ertuzio

How big is that server when everything is installed? I mean how many GB of space does it use?

By: Victor Stadnichenko

Great! Thanks!

By: azam

at the time of  partition a hard disk. i am facing a proble "failed to detect a disk", i am not able to understand what can i do, can you please suggest how can i solve this problem.