In this post I will cover the question around a minimal Ubuntu installation. For the background, I was trying to find a way to install Ubuntu without all the additional software which comes with the default installation. I’m always a fan of starting with the minimal installation and add software as needed.
It turns out, that this is not that easy with Ubuntu as I thought, but finally, after 2 days of testing and fixing I found a way to do this.
Download and Install Ubuntu Minimal
The first step, is to install Ubuntu without any desktop environment. This means, forget the default installation media. you need the minimal ISO file which can be downloaded from the Ubuntu page:
Look for the network installer and then select your version of choice. Select your architecture, which is normally “amd64” and download the “mini.iso” file. Install Ubuntu using this iso image.
As this is a simple follow the wizard kind of installation, I will not show each step in this post. Let’s get to the interesting stuff, right after the installation of the base system.
Install Ubuntu Desktop without the Additional Software
Now, we are getting to the real interesting stuff. If you simply install the desktop from here, it will also add all the additional software, which is, for most of my cases not needed. To avoid this, we will need to install the packages very selectively. Before we can do this, we need to prepare the system.
As we will install the graphical network manager, we need to make sure, it can configure the available network interfaces. To allow the network manager to configure the network interfaces, remove them from the interfaces config file. Open the file:
Change the file to look like this:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
Save the file. From now on, any reboot will cause network connectivity lost, if the network manager is not installed before. To avoid any issues, let’s install the network manager and all the other stuff right away.
To install everything, which is needed, but nothing more, run this commands on the cli:
[email protected]:~$ sudo apt-get update && sudo apt-get install --no-install-recommends ubuntu-desktop
If asked to continue, select yes and the system will download all files needed to install a desktop system without any additional software.
Afterwords, some system applications are needed, install them with the following command:
[email protected]:~$ sudo apt-get install xserver-xorg-video-all gnome-terminal indicator-session network-manager-gnome indicator-applet indicator-network
You can alter the list above and remove or add software as needed, but this is the minimal software I need for most of my cases.
After everything is installed, simply restart the system, and you have a clean desktop environment.
This was a short post, but, if some has written it before, would have saved me a lot of time.
If you have any questions please use the comment function below. If you would like to provide feedback please contact me or use the comment function as well.