- How to run ubuntu/xubuntu in a complete non-gui mode
- 6 Answers 6
- Using Linux without GUI
- How to install Linux without a GUI
- Linux without a GUI – pros and cons
- How to disable GUI
- Closing Thoughts
- Related Linux Tutorials:
- NEWSLETTER
- WRITE FOR US
- TAGS
- FEATURED TUTORIALS
- LATEST TUTORIALS
- Starting Ubuntu without the GUI
- 2 Answers 2
How to run ubuntu/xubuntu in a complete non-gui mode
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.
6 Answers 6
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.
- Close all opened applications.
- press ctrl + alt + F2
- Log in with you user name and password.
- 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.
Using Linux without GUI
A GUI is only a supplemental component of a Linux system, and is not essential. Many System Administrators will elect to keep their servers as command line only, as a GUI is completely unnecessary for running a plethora of different services. Everyday users, however, will usually want a GUI to perform basic functions like web browsing, watching videos, etc.
In this tutorial, we will discuss some of the pros and cons of using Linux without a GUI, and look at scenarios where this type of configuration would be advantageous. You will also learn how to disable the GUI on popular Linux distros like Ubuntu and Debian.
In this tutorial you will learn:
- How to install Linux without a GUI
- Pros and cons of using Linux without GUI
- How to disable the GUI on Ubuntu and Debian Linux
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Any Linux distro |
Software | N/A |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command $ – requires given linux commands to be executed as a regular non-privileged user |
How to install Linux without a GUI
There are plenty of Linux distros that do not come with a desktop environment installed by default. If you do not want to run a GUI on your system, you can install one of these Linux distros. If you change your mind later, it is simple enough to install a desktop environment of your choice some time in the future.
Keep in mind that most Linux distributions that do not come with a GUI pre-installed are geared towards server use, since the vast majority of desktop users will obviously want a GUI. Some Linux distros without a GUI installed by default are:
To keep your system GUI-free, you may have to select the applicable prompt(s) during installation of the above systems.
Linux without a GUI – pros and cons
The main advantage of running Linux without a GUI is that performance will be better. A desktop envrionment can tie up valuable system resources in order to render the fancy graphics and effects that come with running a GUI.
With today’s advanced hardware, is the performance impact still a relevant concern? In most cases, probably not. However, for lightweight devices like a Raspberry Pi, you will definitely see better performance if you decide to skip installing a GUI.
The real reason why so many Linux systems run without a GUI is because they simply do not need one. Everything in Linux can be managed from the command line. As long as the system is not being used for leisure activities like web browsing and watching videos, there is no need for a GUI. For servers, there usually is not a need for a keyboard, monitor, or other periphals, either. Most system administrators will manage the servers remotely with SSH or a similar protocol.
Advantages of running Linux without a GUI:
- Better performance
- Less that can go wrong
- Can be managed with SSH only, no monitor needed
Disadvantages of running Linux without a GUI:
How to disable GUI
The following command will disable GUI on boot hence upon the reboot the system will boot into multi user target:
$ sudo systemctl set-default multi-user
To enable the GUI to start automatically upon system boot, change the systemd target to graphical:
$ sudo systemctl set-default graphical
Closing Thoughts
In this tutorial, we learned about the pros and of using Linux without a GUI. Servers usually do not need to run a GUI, as they provide a very small range of functions. Although there is a performance impact when running a GUI, this is irrelevant for the majority of today’s systems.
Related Linux Tutorials:
Comments and Discussions
NEWSLETTER
Subscribe to Linux Career Newsletter to receive latest news, jobs, career advice and featured configuration tutorials.
WRITE FOR US
LinuxConfig is looking for a technical writer(s) geared towards GNU/Linux and FLOSS technologies. Your articles will feature various GNU/Linux configuration tutorials and FLOSS technologies used in combination with GNU/Linux operating system.
When writing your articles you will be expected to be able to keep up with a technological advancement regarding the above mentioned technical area of expertise. You will work independently and be able to produce at minimum 2 technical articles a month.
TAGS
FEATURED TUTORIALS
- VIM tutorial for beginners
- How to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux
- Bash Scripting Tutorial for Beginners
- How to check CentOS version
- How to find my IP address on Ubuntu 20.04 Focal Fossa Linux
- Ubuntu 20.04 Remote Desktop Access from Windows 10
- Howto mount USB drive in Linux
- How to install missing ifconfig command on Debian Linux
- AMD Radeon Ubuntu 20.04 Driver Installation
- Ubuntu Static IP configuration
- How to use bash array in a shell script
- Linux IP forwarding – How to Disable/Enable
- How to install Tweak Tool on Ubuntu 20.04 LTS Focal Fossa Linux
- How to enable/disable firewall on Ubuntu 18.04 Bionic Beaver Linux
- Netplan static IP on Ubuntu configuration
- How to change from default to alternative Python version on Debian Linux
- Set Kali root password and enable root login
- How to Install Adobe Acrobat Reader on Ubuntu 20.04 Focal Fossa Linux
- How to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux
- How to check NVIDIA driver version on your Linux system
- Nvidia RTX 3080 Ethereum Hashrate and Mining Overclock settings on HiveOS Linux
LATEST TUTORIALS
- Enabling SSH on Raspberry Pi: A Comprehensive Guide
- Boot Your Raspberry Pi from a USB: A Tutorial
- Checking Your Raspberry Pi’s OS Version
- Install an OS on Your Raspberry Pi: Step-by-Step
- Finding Your Raspberry Pi’s IP Address: A Quick Guide
- Easy Steps to Update Your Raspberry Pi
- Connecting Your Raspberry Pi to Wi-Fi: A How-To
- How to install RealVNC viewer on Linux
- How to check Raspberry Pi RAM size and usage
- How to check Raspberry Pi model
- Understanding UEFI and BIOS in Relation to Linux Nvidia Driver Installation
- How to orchestrate Borg backups with Borgmatic
- How to monitor filesystem events on files and directories on Linux
- Debian USB Firmware Loader Script
- How to install and self host an Ntfy server on Linux
- How to backup your git repositories with gickup
- How to bind an SSH public key to a specific command
- Creating a Bootable USB for Windows 10 and 11 on Linux
- How to list all displays on Linux
- List of QR code generators on Linux
Starting Ubuntu without the GUI
I want to boot a «Ubuntu 10.04.2 LTS» server, but I want XFCE not to be started, nor X at all, only Shell. How do I tell my server to boot to the shell, not running XFCE at all? I have an SSH connection to the server, but no display connected. Since I migrated from earlier versions I use GRUB 1, where no /etc/default/grub exists. I would like to set the target runlevel somewhere, without changing GRUB at all.
In the meantime I found «sudo service gdm stop» and «sudo service gdm start» which goes to the right direction. But «gdm stop» should be the default. Or I install Ubuntu server. But then I cant change any more. A link was: ubuntuforums.org/showthread.php?t=1305659
2 Answers 2
I see three ways to do it:
1. Changing the default runlevel
You can set it at the beginnign of /etc/init/rc-sysinit.conf replace 2 by 3 and reboot. You can enable the graphical interface with telinit 2 .(More about runlevels)
2. Do not launch the graphical interface service on boot
Quick and easy. You can re-enable the graphical interface with service xdm start or revert your changes with update-rc.d -f xdm defaults
3. Remove packages
apt-get remove —purge x11-common && apt-get autoremove
I think it suits best for a computer considered as a server. You can re-enable the graphical interface by reinstalling the packages.