I've recently installed Ubuntu. It's graphical; how can I switch to command-line mode so that everything is to be typed, like DOS?

  • 1
    CTRL + ALT + F3 for Ubuntu 17.10 onward.
    – logbasex
    Nov 3, 2020 at 17:58

4 Answers 4


On recent versions of Ubuntu, there are several (by default 7) "virtual terminals", each of which can have its own display environment. By default, VTs 1, 2, 3, 4, 5, and 6 contain text-mode Linux consoles, and VT 7 contains an X session (graphical Linux desktop).

The default command to switch to VT n is Ctrl-Alt-Fn. So to switch to a non-graphical view, press Ctrl-Alt-F1. Note that you have to log in separately on each virtual terminal. After switching, enter your username and password to get to a Bash prompt.

To switch back to your graphical session, press Ctrl-Alt-F7. (If you have logged in using "switch user", to get back to your graphical X session you may have to use Ctrl-Alt-F8 instead, since "switch user" creates an additional VT to allow multiple users to run graphical sessions simultaneously.) If you're done with the text-mode session, first press Ctrl-D at the Bash prompt to log out of that session (otherwise, other people could get to a logged-in session, bypassing your password check).

Note that you don't have to do this to type commands at the command-line: You can use a terminal program like gnome-terminal within your graphical session (see Pavium's answer).

  • how to login in virtual terminal, it alway prompt "login incorrect" Aug 20, 2018 at 15:46

It's not necessary to completely shut down the GUI.

The interface for the command-line is called 'Terminal', in Applications/Accessories.

If you do want to shutdown the GUI (the X server), see Ubuntu Linux - shutdown the X server

  • Is it convenient to switch back and force ?
    – PHP
    Jan 26, 2010 at 4:14
  • 1
    @PHP: The terminal pavium is referring to is a window within the GUI so switching back and forth between windows is as easy as Alt-tab or a mouse click. Jan 26, 2010 at 4:46

Ubuntu 18.04 allows me to go to terminal mode with Ctrl+Alt+F3 and back to GUI with Ctrl+Alt+F1.

I realize this is an old post, but it still can be useful today.


Ubuntu (like other Unix-variants) has multiple Terminals. The graphical console you are seeing is on 7. The first 6 are text consoles. You can switch between text consoles by using ALT+[number of terminal]. To switch from the graphical console you will have to add STRG to that command.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy