I am looking to run Ubuntu/Xubuntu in a complete non-GUI mode. Like, when the system starts it needs to log in into console. That is all, no loading of any display manager, x server, GUI-based app support, nothing in the background either for GUI.

What you want is can be achieved by installing Ubuntu Server Edition which does not has a display manager, X server etc. But if you do have an Ubuntu or a Xubuntu installation in your computer and want to work in a non-GUI environment, you can use virtual consoles which are called tty.

  1. Close all opened applications.
  2. press ctrl+alt+F2
  3. Log in with you user name and password.
  4. Stop display server and Xserver by giving sudo service lightdm stop command.

To restart GUI, sudo service lightdm start command is enough.

And you are ready to work in an environment as you described in your post.

Another workaround you can use to remove a lot of packages to obtain "pure Ubuntu" as described in this blog post. For Xubuntu, the command that will leave you with "pure Ubuntu" is

sudo apt-get remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview alacarte bison blueman brltty-x11 catfish espeak exo-utils flex fonts-droid fonts-lyx gcalctool gigolo gimp gimp-data gksu gmusicbrowser gnome-desktop-data gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gstreamer0.10-gnomevfs gthumb gthumb-data gtk2-engines-pixbuf indicator-application-gtk2 indicator-sound-gtk2 libabiword-2.9 libamd2.2.0 libbabl-0.1-0 libbison-dev libblas3 libcolamd2.7.1 libdigest-crc-perl libexo-1-0 libexo-common libexo-helpers libfl-dev libgarcon-1-0 libgarcon-common libgdome2-0 libgdome2-cpp-smart0c2a libgegl-0.2-0 libgimp2.0 libgksu2-0 libglade2-0 libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgoffice-0.10-10 libgoffice-0.10-10-common libgsf-1-114 libgsf-1-common libgstreamer-perl libgtk2-notify-perl libgtk2-trayicon-perl libgtkmathview0c2a libgtksourceview2.0-0 libgtksourceview2.0-common libgtkspell0 libido-0.1-0 libintl-perl libjavascriptcoregtk-1.0-0 libjpeg-progs libjpeg-turbo-progs libkeybinder0 liblink-grammar4 libloudmouth1-0 libnet-dbus-perl liboobs-1-5 libotr5 libots0 librarian0 libsdl1.2debian libsexy2 libsigsegv2 libtagc0 libthunarx-2-0 libtidy-0.99-0 libtie-ixhash-perl libtumbler-1-0 libumfpack5.4.0 libunique-1.0-0 libvte-common libvte9 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libwv-1.2-4 libxfce4ui-1-0 libxfce4ui-utils libxfce4util-bin libxfce4util-common libxfce4util6 libxfcegui4-4 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl lightdm-gtk-greeter link-grammar-dictionaries-en locate lp-solve m4 mousepad orage parole pastebinit pavucontrol pidgin pidgin-data pidgin-libnotify pidgin-microblog pidgin-otr plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text python-configobj rarian-compat ristretto screensaver-default-images scrollkeeper shimmer-themes system-tools-backends tcl8.5 tcl8.5-lib thunar thunar-archive-plugin thunar-data thunar-media-tags-plugin thunar-volman ttf-droid tumbler tumbler-common xbrlapi xchat xchat-common xchat-indicator xfburn xfce-keyboard-shortcuts xfce4-appfinder xfce4-cpugraph-plugin xfce4-dict xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-notes xfce4-notes-plugin xfce4-notifyd xfce4-panel xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-session xfce4-settings xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfce4-xkb-plugin xfconf xfdesktop4 xfdesktop4-data xfwm4 xscreensaver xscreensaver-data xscreensaver-gl xubuntu-artwork xubuntu-default-settings xubuntu-desktop xubuntu-docs xubuntu-icon-theme xubuntu-wallpapers

I removed the last command, which is apt-get install ubuntu-desktop, that installs packages like Unity and turn your Xubuntu to Ubuntu. As you can see, there are a lot of packages that is very hard to track and you may need some packages. Since I do not use Xubuntu, I can not say which packages must be kept.

  • thanks for the quick responses. when i boot ubuntu from VBOX, it should not load any GUI at all. A complete terminal mode login prompt should display. I have only Xubuntu 12.04 Desktop Edition. How can i achieve this.do not want to reinstall/download another 700MB iso file. please provide your inputs. Thanks,Harish Pathangay – Harish Pathangay Nov 16 '13 at 21:42
  • You are wellcome @Harish. As I said in my post, if you have Xubuntu installed, you can use virtual consoles or you can remove a alot of packages. I updated my answer. – numand Nov 16 '13 at 22:02
  • Thanks very much. Askubuntu itself had few other threads posted with solution to modufy the /etc/default/grub file which worked pretty well. Thanks again. – Harish Pathangay Nov 16 '13 at 22:37

You can simply disable X from startup. Install rcconf:

sudo apt-get install rcconf

Run it with sudo:

sudo rcconf

And search for the entry x11-common, disable it and select OK. Then reboot.

enter image description here

If you ever change your mind, Xorg will be still installed, but it won't load on startup so you just need to re-run rcconf and re-enable x11-common.

  • 1
    Hi,I also came across another solution. Virtual Box images for ubuntu server edition is already available for download. I did not even install ubuntu.Just downloaded the VDI image file for Ubuntu Server edition and loaded into my Virtual Box. Lot of time saved also the image file is only 300MB approx. Thanks,Harish Pathangay – Harish Pathangay Nov 23 '13 at 8:55
  • 3
    @darent your solution doesnt work in 14.04 – Ubuntuser Mar 16 '15 at 11:29
  • nope didn't work ! – MoolsBytheway Aug 22 '17 at 0:24

With Ubuntu 15.10, I had to:

sudo systemctl disable lightdm

The rcconf and /etc/default/grub solutions were not cutting it.

Actually it is easy to do but it would be little risky for beginners.

Also it would not be the best way but you can easily achieve this. I'm posting the way to make Ubuntu to run without GUI mode also how to revert:

Make Ubuntu to run without GUI

You have to un-install the only display manager installed to your system. It would be lightdm display manager. so to remove it execute this command:

sudo apt-get remove lightdm

Then restart your system. Your system will start in CLI mode. You may have to press Ctrl+Alt+F1 to go to CLI tty1 mode.

Revert Back to GUI Mode

Again install the display manager to get the display. Use following command to do so:

sudo apt-get install lightdm

and restart your system with:

sudo reboot

That's it. Reply if you need any help or something goes wrong.

  • thanks for the quick responses. when i boot ubuntu from VBOX, it should not load any GUI at all. A complete terminal mode login prompt should display. I have only Xubuntu 12.04 Desktop Edition. How can i achieve this.do not want to reinstall/download another 700MB iso file. please provide your inputs. Thanks – Harish Pathangay Nov 16 '13 at 21:42
  • It seams that you've not tried this yet. Yes it will do exactly the same you want :) But you now mentioned that you want to achieve in Xubuntu, it is import to know the default display manager used in Xubuntu. What I want for confirmation is the display manager you are using. So just provide the output of this command: cat /etc/X11/default-display-manager and this : ls /usr/sbin/*dm. – Saurav Kumar Nov 17 '13 at 14:20
  • Hi,I also came across another solution. Virtual Box images for ubuntu server edition is already available for download. I did not even install ubuntu.Just downloaded the VDI image file for Ubuntu Server edition and loaded into my Virtual Box. Lot of time saved also the image file is only 300MB approx. Thanks,Harish Pathangay – Harish Pathangay Nov 24 '13 at 11:19
  • 1
    This solution is the ONLY one that worked for me. xubuntu via ubuntu arm 14.04 – Jacksonkr Mar 30 '16 at 21:58

Updating grub file's parameters worked for me.

First backup original grub file.

sudo cp -n /etc/default/grub /etc/default/grub.orig

If for some reason you want to revert to original settings, just run command below in terminal:

sudo mv /etc/default/grub.orig /etc/default/grub && sudo update-grub

Now edit the grub file

sudo nano /etc/default/grub
  1. Comment the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”, by adding # at the beginning, which will disable the Ubuntu purple screen.
  2. Change GRUB_CMDLINE_LINUX=”" to GRUB_CMDLINE_LINUX=”text”, this makes Ubuntu boot directly into Text Mode.
  3. Uncomment this line #GRUB_TERMINAL=console, by removing the # at the beginning, this makes Grub Menu into real black & white Text Mode (without background image)

Finally run grub update and restart the system. Next time it will come up with terminal mode.

sudo update-grub

As explained here.

  • Don't use sudo for GUI applications – A.B. Jul 8 '15 at 5:16
  • @A.B. I didn't got your point. How we can udpate without sudoing? Or Am I missing something!? – Saumya Suhagiya Jul 8 '15 at 5:19
  • use e.g. gksu or gksudo for GUI applications and sudo for CLI applications, eg: sudo nano and gksudo gedit – A.B. Jul 8 '15 at 6:22
  • This didn't work for xubuntu via ubuntu arm 14.04 because the grub file doesn't exist. – Jacksonkr Mar 30 '16 at 21:54

To ensure a complete non-GUI mode boot on Ubuntu without installing or uninstalling anything, do the following:

  • Open the /etc/default/grub file with your favourite text editor. I use vi:

    sudo vi /etc/default/grub

  • Press i to enter into vi edit mode.
  • Look for the line that reads #GRUB_TERMINAL=console and uncomment it by removing the leading #
  • Press Esc to exit vi edit mode.
  • Type :wq to save the change made to the /etc/default/grub file and exit vi
  • Run sudo update-grub on your terminal to apply the modification you made to /boot/grub/grub.cfg

    If your computer uses systemd, you must tell systemd to skip the default login GUI thus:

  • sudo systemctl enable multi-user.target --force

  • sudo systemctl set-default multi-user.target

  • Reboot your computer: sudo reboot

Now, every time you boot your system, you'll boot into a terminal.
But if you change your mind and want the login GUI to come up, simply run the following on the terminal that you booted into:

sudo systemctl start lightdm.service

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.