Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Jan 26 '10 at 11:32

This question came from our site for system and network administrators.

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

share|improve this 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 this link

share|improve this answer
Is it convenient to switch back and force ? – PHP Jan 26 '10 at 4:14
@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. – Dennis Williamson Jan 26 '10 at 4:46

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.

share|improve this answer
STRG=Ctrl on some keyboards – Dennis Williamson Jan 26 '10 at 4:44

You must log in to answer this question.