Fundamentals

First touch to the command line

Easy
20 min

You can use the Linux command line above to start the task and open it in its own window.

The Linux command line is a text-based program that provides an interface between the user and the operating system. In the command line, a command interpreter program is usually executed, which handles the execution of commands given on the command line. There are many different command interpreter programs, but one of the most common is Bash, or Bourne Again Shell. The command line is used through text-based commands, unlike in graphical programs where the use is done with the mouse. This gives rise to the definitions of CLI and GUI, or Command Line Interface and Graphical User Interface. The command line handles almost all possible tasks, often faster than using graphical tools. Additionally, it also supports automation, allowing you to run multiple commands at once, which is useful, for example, in cybersecurity testing.

The command line allows for unlimited different use cases and speeds up many tasks, but the best way to learn to use the command line is by trying it out yourself courageously.

Notice the text that ends with a dollar sign. This is called a prompt and it tells you that the command line is ready to accept commands. It is important to understand that when you execute a command, the output produced by the command is almost always displayed directly on the command line, and when the command is finished, the prompt will appear again. Depending on the command, there can be a lot of text that appears, while sometimes no text may be displayed at all.

Job directory

A working directory refers to the location in the file system where your command line is operating. It is important for the command line to maintain knowledge of the current working directory as it needs to be able to create, modify, and delete files and directories. This would not be possible if the command line does not know where these operations should be performed. By default, the command line creates, modifies, and deletes files located in the current working directory of the command line.

Write the following commandand press enter.

pwd

This should return your current working directory, which is the path to your home directory. pwd stands for print working directory and translated directly, it means: print the current working directory. So if you ever want to know your current working directory, use the pwd command.

hakatemia pro

Ready to become an ethical hacker?
Start today.

As a member of Hakatemia you get unlimited access to Hakatemia modules, exercises and tools, and you get access to the Hakatemia Discord channel where you can ask for help from both instructors and other Hakatemia members.