Navigating the Command Line

From docwiki
Revision as of 13:33, 21 March 2020 by Mond (talk | contribs)
Jump to: navigation, search

Navigating the Command Line

Before you can use commands on the command line you need to know how to even get there and then it helps to know some keyboard shortcuts for basic editing.

Where to find the Command Line

When you are logged in the graphical environment on a Linux desktop you can open a Terminal window. There are many different versions of it: gnome-terminal, Konsole, rxvt, lxterminal, xterm, st, ... and many more. Basically all do the same: They present you with a terminal window where you text-characters can be displayed and you can enter text.

There are tools where you can connect to remote computer via network and get a text console there.

On a naked Linux system without a graphical environment you are presented with a login prompt and when you log in with username and password you can enter commands there. Linux gives you multiple virtual text consoles there: You can switch between them by Pressing Ctrl-Alt-F1 to Ctrl-Alt-F10. (Ctrl is "Strg" on German Keyboard). (This will often also work when you have a graphical environment.)

Often your computer also has a serial port. E.g. On your Raspberry Pi, you can use 3 wires (Ground, Rx (receive-data) and Tx (transmit-data) ) to run a terminal connection over that and work without keyboard or monitor connected. This is useful if your network is not working because you have e.g. changed your WiFi password.

The Shell

Now when you have your terminal ready you will be greeted by a so called prompt.

anna@tinbox:~ >

Your prompt will look different, as it is configurable and will likely show your own username and the name of your computer. The ~ means that you are in your home directory and you can enter commands after the >

The program that presents you the prompt and that also processes your input and executes your commands is called a shell.