I cannot understand this Linux command

The 10 most important Linux commands for beginners

Hans-Christian Dirscherl

Did you install Linux for the first time and / or have just switched from Windows to Linux? And want to deal with the infamous Linux commands? Then we have the right advisor for you: The ten most important Linux commands for beginners and those switching.

EnlargeWe introduce the ten most important Linux commands for Linux beginners.
© isak55 / Shutterstock.com

Every beginning is difficult. However, so that entry into the world of Linux commands alias command line commands alias console commands is not too difficult for you, we have put together the ten most important Linux commands and command families for beginners and those switching. So that you don't stumble during your first steps with Linux.

Important: There are numerous options and extensions for almost every command presented here. We only offer a basic overview and do not present all options for every command.

Preparations: Open a terminal window

Open a terminal window on your Linux PC (also called a command line window or shell or console). Under Ubuntu with a Unity interface, enter “xterm” in the dashboard (which you open by clicking on the Ubuntu icon at the top left) and then start Xterm with a single mouse click. Alternatively, press the key combination CTRL + ALT + T (for other Linux distributions or desktop interfaces, use the corresponding key combinations or menu items). The Xterm window, which is relatively small by default, can be enlarged at any time with the mouse pointer

After opening, you will see the white cursor behind the command prompt (by default this consists of your user name in front of the @ and the computer name after the @. You can change the composition of the command prompt in the configuration file of your Linux system). Enter the Linux commands after this command prompt.

Tip: Use the key combination CTRL + C to cancel an output in the terminal window. This helps, for example, if a (faulty) command consistently only delivers garbage. In our example we have an image file with cat (with the command cat filename you can display the content of simple text files (cat is only suitable for short files), which led to a less meaningful result.

1. Clear: clear the input window

After countless entries you have lost the overview and simply want the entry window to be empty again: Type “clear”. Alternative: CTRL + L.

2. Whoami - who am I - and Who

You are not sure what your username is under which you are logged in ?: "whoami" provides the answer (alternatively you can also enter "who -m".

Whoami is especially useful if you frequently switch back and forth between different users or root and the username is not displayed in the command prompt.

Linux command reference. Shell commands from A to Z.

Linux expert Michael Kofler describes the most important Linux commands and their options on over 460 pages. The command reference is structured alphabetically and is therefore well suited for looking up if you already know a command and would like to know details about it. The commands are also structured thematically so that you can find the right command even if you don't yet know its name. Plus: overview of configuration files and keyboard shortcuts. Available for 19.90 euros from Rheinwerk Verlag.

You must not confuse whoami with the equally useful “who” - this provides all users currently logged on to your Linux system. After entering who, you can see which user logged on to which device on which day and at what time. With "who -a" you force a detailed output, for example by specifying the login time. An alternative to who is the id command.

Extra tip: With the command "last" you can see who was last logged on.

There are these Ubuntu Linux variants

3. pwd: Where am I?

You have lost your orientation and no longer know which directory you are in. The bash command "pwd" helps and shows your current directory.