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?


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).


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


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.