How To Boot Into Linux Command Line

There may be times where you need or want to boot up a Linux system without using a GUI, that is with no X, but rather opt for the command line. Whatever the reason, fortunately, booting straight into the Linux command-line is very simple. It requires a simple change to the boot parameter after the other kernel options. This change specifies the runlevel to boot the system into.

​Why Do This?

If your system does not run Xorg because the configuration is invalid, or if the display manager is broken, or whatever may prevent the GUI from starting properly, booting into the command-line will allow you to troubleshoot by logging into a terminal (assuming you know what you’re doing to start with) and do whatever you need to do. Booting into the command-line is also a great way to become more familiar with the terminal, otherwise, you can do it just for fun.  

​Accessing GRUB Menu

On startup, you will need access to the GRUB boot menu. You may need to hold the SHIFT key down before the system boots if the menu isn’t set to display every time the computer is started. In the menu, the Linux distribution entry must be selected. Once highlighted, press ‘e’ to edit the boot parameters.

zorin os grub menu

Older GRUB versions follow a similar mechanism. The boot manager should provide instructions on how to edit the boot parameters.

​​Specify the Runlevel

​An editor will appear and you will see the options that GRUB parses to the kernel. Navigate to the line that starts with ‘linux’ (older GRUB versions may be ‘kernel’; select that and follow the instructions). This specifies parameters to parse into the kernel. At the end of that line (may appear to span multiple lines, depending on resolution), you simply specify the runlevel to boot into, which is 3 (multi-user mode, text-only).

customize grub menu

Pressing Ctrl-X or F10 will boot the system using those parameters. Boot-up will continue as normal. The only thing that has changed is the runlevel to boot into.

This is what was started up:

boot linux in command line


You can specify different runlevels to boot into with runlevel 5 being the default one. 1 boots into “single-user” mode, which boots into a root shell. 3 provides a multi-user, command-line only system.  

Switch From Command-Line

At some point, you may want to run the display manager again to use a GUI, and the quickest way to do that is running this: $ sudo init 5 And it is as simple as that. Personally, I find the command-line much more exciting and hands-on than using GUI tools; however, that’s just my preference.


MassiveGRID Banner
7 Comments Text
    • Thank for the detailed article. I am working on zorin grub v2.02beta2. Following your article, I could not boot into command mode. When I restarted, the edited grub code does not exist!

  • unable to launch “cinnamon-session-cinnamon” X session — “cinnamon-session-cinnamon” not found; falling back to default

  • Cool but this does not help me.

    I need to go to the command line bypassing grub altogether (probably) because:
    at the moment I get to “grub loading” followed by a blank screen!
    (ie the grub menu never shows up, or if it does, it is not visible, I get a “no input” on the display)

    Any ideas?

    • PS: ubuntu 20 LTS.
      The display says “no signal”… which is weird as it has been displaying the text-based stuff all along…
      up to and including “grub loading…”
      I tried pressing “e” here but it still just went to “No Signal”

      Any help appreciated!

  • Hello! Any way to jump to CLI from GUI? As you said, you can type “sudo init 5” and it jumps to GUI. My question is, is vice versa possible?

  • Leave a Reply

    Your email address will not be published. Required fields are marked *