Terminal Activity

Keyboard Commands

There are several keyboard tricks that are good to know when using the Terminal Activity. These save time and work regardless of the commands you are using.

CTRL L

If you been doing a lot in your terminal and the terminal window is full of text you can press ctrl on the keyboard and l (lower case L) simultaneously and the terminal window is cleared of text leaving you with a nice clear terminal.

CTRL C

If for any reason you replace that a command you are using seems to be stuck or is taking too long you can use ctrl and c (pressed simultaneously) and this halts the command. This means your command will be stopped before it finishes so make sure you really want to do this before trying it.

TAB Complete

If you want to save some time typing out long commands you can always use the tab key. This is called "Tab completion". If you have partly typed a command try pressing the tab key. If there are no other commands that start with the same sequence of letters then the complete command is automatically displayed in the terminal. Try for example typing half of the "help" command like this:

hel

followed by pressing tab. You see the terminal displays "help". This is because the terminal "knows" that there are no other commands starting with "hel" so it assists you by completing the full command name when you press tab.

If there is more than one command that starts with the letters you have typed then pressing tab once does nothing. Try, for example, typing:

he

followed by the tab key. Nothing happens. Now try the same thing but press tab and quickly follow it by pressing tab again. In this case you see all the other commands displayed that start with "he" like so:

help

You can now see the other commands starting with these same letters and you can either choose one by typing out the whole command, or you can type some more letters of the command you want and finish it with "Tab complete".