Home » Home Server » Force Ubuntu boot into terminal by default

Force Ubuntu boot into terminal by default

So you may ask why would I want to make Ubuntu boot into terminal by default. Well, this post is specifically drafted for Ubuntu server, which is typically recommended to be left at commandline until a GUI environment is absolutely needed. But if have have other reasons to make your Ubuntu boot to command line then knock yourself out. I have set my Ubuntu server to boot to commandline by default for security reasons. Additionally this also reduces stress on my low power home server resources. When you really need a graphical user interface you can make Ubuntu boot to GUI with a simple command. First, I will show you how to make Ubuntu boot into terminal in 14.04 Trusty Tahr Server. This should also work in other flavors of Ubuntu. [Read: Install GUI on Ubuntu server 14.04 Trusty Tahr]

Force Ubuntu Boot into Terminal

To make Ubuntu boot command line by default, you will have to open and edit /etc/default/grub. Open terminal, and open the file using the following command:

sudo nano /etc/default/grub

Find the line that says GRUB_CMLDLINE_LINUX_DEFAULT. By default it should have quotation marks with nothing in between. Add the word “text” within the quotation marks as shown in the picture below.

Ubuntu Boot into Terminal
Ubuntu Boot into Terminal – Grub Edit

Save the file by pressing Ctrl X, followed by “Y”. Then update Grub using the command sudo update-grub to make Ubuntu boot into terminal on reboot.

Ubuntu Update Grub
Ubuntu Update Grub

Upon reboot, you should Ubuntu boot to commandline by default. You may watch this in action in the video tutorial below.

Video: Make Ubuntu boot to command line by default

How to Start the GUI?

What you want to start your desktop environment or GUI? It’s easy, after you login just run the the command below and it should take you to your GUI desktop. [Read: Minimal desktop environment for Linux servers]


If you have multiple desktop environments installed then Ubuntu will start your last used GUI.

Recommended Guides:

Make Ubuntu Boot to GUI

To reverse the changes and make Ubuntu boot to GUI desktop environment by default, edit the /etc/default/grub file again and remove the word “text” from the quotes for GRUB_CMLDLINE_LINUX_DEFAULT, as shown in the picture below.

Ubuntu Boot to GUI - Grub Default
Ubuntu Boot to GUI – Grub Default

Save (Ctrl X and then “Y” on nano editor) and exit. Upon reboot you should reach the graphical login manager directly.

In summary, some advantages to making Linux boot to command line are more security and less use of hardware resources. So if you run a Ubuntu home server, I strong recommend that you make Ubuntu boot into terminal environment by default and start GUI on demand basis. If you have other thoughts please leave a comment. Enjoy!

We Are Hiring: Familiar with Media Streaming, HTPC, Home Server, Smart Home, and Home Automation topics? Write about it and earn money. No writing experience needed. APPLY HERE.

Get 20% OFF with IPVanish VPN:

♦   Hide your browsing and streaming activity: No logs and no tracking
♦   Access geo-restricted content from anywhere
♦   Encrypt and anonymize: Kodi, Plex, Downloads, Personal Info
♦   Windows, Mac, Linux, Android, iOS, Router, and more.
♦   Money back guarantee - Sign Up Now

About the author


Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs on htpcbeginner.com and smarthomebeginner.com.


Join the other 110,000 followers

Don’t Miss Out!