Linux Tutorial Part1

These tutorials explain the Linux operating system (os) step by step. Starting with simple examples and getting more advanced each lesson.

The line where we type in the commands is called the prompt, the blinking something right to it is the cursor.

Lets show who is logged in:


And the hostname of the computer can be shown with:


As you can see, username and hostname are contained in the prompt.

If you want to know the name of the operating system, you can use:


How long the computer is up (not rebooted since) shows the following command:


Clear all the stuff on the screen with:


If you using the arrow keys (up and down), you can browse between the commands you already entered.

When you want to know in which folder you are, use:


It’s short for: print working directory.

Let’s go to your users home directory by typing:


At this location, all the files related to your current user are stored. You home-folder is a special folder. The tilde sign „~“ is a synonym for your home folder. Instead of typing „cd“ you can type „cd ~“ as well. When you’re in your home folder you can see the tilde in the prompt. The tilde sign is a variable. You can output its content to the screen:

echo ~

Create a directory named garage withe this command:

mkdir garage

mkdir is short for: make directory

Most important command of all is „cd“. It means change directory. With this command you can browse in the directory tree.
Let’s switch to the directory „garage“ you recently created by typing:

cd garage

The prompt, by the way, also shows you in which directory you are. (So you don’t have to type pwd all the time)


If I want to go back in the directory-tree, like one level up, we use:

cd ..

Don’t forget a space between cd and the two dots. The two dots are a symbol for the upper (superordinate) folder.

If you type the first letters of a command, try to press two times the tab-key, and the command will be completed.
This will save your time. It’s one of the most useful ways to increase your working speed.

Linux Tutorial Part2 >>