In this lesson we will cover the essential commands in Linux. We will learn how to list the content of a directory, print the working directory, create a new file or directory, print a line of text, etc.
The ls command lists the directory content. If no directory is specified, the command will display the content of the working directory.
The pwd command is used to print the path of the current directory.
To create a new directoy, the mkdir command is used. You must specify the name of the directory. If no path is specified, the directory is created inside the working directory.
In the picture above you can see that we’ve created a directory called my_folder using the mkdir command. We have then displayed the content of the directory with the ls command.
The echo command is used to to output text to the screen. You simply type echo and then the text you would like to display.
The whoami command displays the username of the current user.
To change the current working directory we use the cd command. You must specify the path of the directory you would like to access.