30

I've found several solutions to convert Ubuntu 12.04 Desktop to Server, with the following commands:

sudo apt-get install tasksel
sudo tasksel remove ubuntu-desktop
sudo tasksel install server
apt-get install linux-server linux-image-server
apt-get –purge remove lightdm

I just want to know if it is the same process with Ubuntu 14.04. The reason I need to do this is because I need to install moodle (some people may have other reasons to do this so I hope this helps them too) and it requires to run over Ubuntu Server rather than Desktop. Thanks

3 Answers3

31

NOTE: the following commands are good only to Ubuntu version less/older than 12.04, see Server FAQ, CAUTION: you might end up with a useless system.

Thanks for your answer but I've found you need to add the update line

sudo apt-get update

Also corrected the following line

sudo apt-get -purge remove lightdm

To

sudo apt-get purge lightdm

The full version of the corrected script is below

# update
sudo apt-get update

# install the 'tasksel' package so we can remove the desktop image       
sudo apt-get install tasksel

# remove the desktop image
sudo tasksel remove ubuntu-desktop

# tell tasksel to start the server image setup
sudo tasksel install server

# install the server images
sudo apt-get install linux-server linux-image-server

# remove lightdm
sudo apt-get purge lightdm

# remove all packages no longer required (~400 MB)
sudo apt-get autoremove
muru
  • 207,228
nityan
  • 411
4

The simple answer is yes, but running the commands you are able to install Ubuntu server. Ensure that you make the following changes to the grub configuration file located at /etc/default/grub:

GRUB_TIMEOUT=10
( Comment out ‘GRUB_HIDDEN_TIMEOUT’ )
GRUB_CMDLINE_LINUX_DEFAULT=”"
GRUB_TERMINAL=console ( only for PC )

Then you can run

sudo update-grub
heemayl
  • 93,925
2

The assumption that you need to uninstall your Ubuntu desktop and install Ubuntu server is faulty.

However for a real installation its always better to have a minimal installation containing only what you need.

Ubuntu server is just a minimal Ubuntu install with a specific kernel optimized for serving many clients. Instead of a single user in the case of a desktop. any application / Service you can run on your Ubuntu server you can run on Ubuntu desktop

Checking the installation requirements on moodle

We can see that what is needed is:

  • a webserver
  • php support for the webserver
  • a database
tomodachi
  • 15,370