Ubuntu 12.10 – How to get a Command Line, Shell, or Terminal

These instructions are for Ubuntu 12.10 using the Unity interface (although, hints are provided at the bottom of the article for those who have installed a different desktop).

Linux (of which Ubuntu is a flavour) and it’s inspiration Unix, have a strong emphasis and tradition of doing everything via typed commands.

Often, when searching the Internet for a solution to a problem, you often find terse (possibly cryptic) answers along the lines of:

Test if you can reach Google with ping -c 4 google.com


To recursively change your file permissions just: chmod 755 -R /opt/lampp/htdocs

In order to run those commands, you have to open a shell or command line or terminal (they are all synonymous, but shell is the preferred term in Linux and Unix circles).

There are many different shells, the original Unix shell is called the Bourne Shell (or sh), then came the C Shell (csh) and Korn Shell (ksh). Linux tends to use the Bourne Again Shell (bash). For the most part, they all do the same thing, so you don’t need to worry about which one you are using.

If you want to know which shell you are using, just enter echo $SHELL at the command line and press Enter.

TIP: If you find a command line solution / trick / tip for a non-Ubuntu Linux distribution, there is a good chance (though not 100% guaranteed) that it might work with Ubuntu.

If you get a Permission denied or Are you root? response when you type in the command, try prefixing the command with sudo. Ubuntu requires administrator level privileges for certain commands. sudo temporarily gives administrator privileges (after you supply your password).

Opening a Terminal using a Keyboard Shortcut

This is the default keyboard shortcut for Ubuntu 12.10 (and probably previous Ubuntu releases) running the GNOME / Unity desktop, unless you (or someone else) has changed it, it should work.

This also the default keyboard shortcut if you have changed your desktop environment to GNOME Shell, LXDE, or the Lubuntu Desktop and will work unless you (or someone else) has changed it.

This will NOT work for the XFCE or Xubuntu Desktop unless you (or someone else) has added the keyboard shortcut.

1) Press Ctrl + Alt + T to open a terminal / command line / shell.

NOTE: pressing Ctrl + Alt + T means: simultaneously hold down the Ctrl key and Alt key, then press the T key as though you intend to type it.

DO NOT press the Shift key because Ctrl + Alt + Shift + T is different from Ctrl + Alt + T.

It does NOT matter if your Caps Lock is on or off.

The terminal should look something like this:

Opening a Terminal from Unity

1) Click the Dash icon (or use the keyboard shortcut by pressing the Windows key – don’t hold it down, just tap it as if you were going to type it):

2) Type terminal into the entry field:

3) Click on the terminal icon:

Alternately, you can navigate to the terminal icon by using the arrow keys on your keyboard (if you are using the arrow keys built into your numpad ensure that Num Lock is off) and then pressing the Enter key to select it.

Opening a Terminal if You are not Using Unity

Because there are many different types of desktops available for Linux, it is not possible to list all possible ways to start the terminal. However … the general technique is the same:

1) Open the Main Menu or Applications Menu (or whatever the main menu for your environment is called).

2) If you are lucky, there will be a menu entry for a terminal (it might be called Terminal or LXTerminal or something else with terminal in the name.

3) If you are unlucky, then you will have to look for it in a submenu. It is most likely to be found in a submenu called Accessories or System.

NOTE: You may have more than one terminal application installed or the terminal application may appear in more than one menu location.

How to (Almost) Always Get a Command Prompt

This works with pretty much any Linux distribution (unless they have been specially compiled to disable it).

If you need to access the command line and no terminal application has been installed, or you can’t find it, or the GUI has become unresponsive, you can press Ctrl + Alt + F1 to switch you to a full screen text terminal / command line. To return to your GUI, press Ctrl + Alt + F7.

NOTE: pressing Ctrl + Alt + F1 means: simultaneously hold down the Ctrl key and Alt key, then press the F1 key as though you intend to type it.

The same is true when pressing Ctrl + Alt + F7.

It does NOT matter if your Caps Lock is on or off.

In all Linux distributions (unless specially compiled otherwise), Ctrl + Alt + F1 through Ctrl + Alt + F6 provide access to 6 full screen command line terminals. These 6 terminals are always available, so it doesn’t matter which one you access.

In the same way, Ctrl + Alt + F7 through Ctrl + Alt + F12 provide access to running X Servers. Normally, there is only one and it is found at Ctrl + Alt + F7 – unless you have enabled additional X Servers to be running F8 through F12 will be blank screens.

You will be required to login with your username and password (as with all command lines, your password is not echoed back to you):

Otherwise, it behaves exactly like any other terminal.

Leave a Reply

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