Guides and tutorials

Hundreds of tutorials and step by step guides carefully written by our support team.

Basic commands to use in the terminal

In this manual you will learn the basic commands to handle the terminal of your Linux server.


As the acronym of its name indicates, it is used to Change Directory.

To go to the root of the directory:

cd /

If we want to go to a specific directory:

cd my_directory/another_directory

To go to the previous directory:

cd .


With this command we will obtain a "LIST" of the directories and/or files, it would be like a DIR of MS-DOS:


You can use the *, which will do the wildcard function:

ls *.txt

It would show only files with the extension .txt


With this command you can create a directory:

mkdir new_directory


Unlike the previous command, this command is used to delete directories:

rmdir new_directory


MV is used to move files, after the "command" we will put the file we want to move and the destination directory:

mv my_file my_directory


RM is used to delete files, if accompanied by * it will delete all files in the directory you are in:

rm my_file
rm *


This command is used to clear the terminal screen:



CP of "COPY", used to copy files and directories:

cp file copy_file

You can make the copy in another directory:

cp file /directory/sub_directory


DF indicates the disk space, available, used and total:

df -h


DU is used to find out how much space a file occupies in a directory:

du /my_directory

If you want to know how much space is occupied by files with the same extension (with -s), you can find out:

du -s *.txt


It is used to find a file. By default, the command would show a list of all directories and files starting from the directory you are in:

find -name filename


If something doesn't work, this command will be of great help, first we will have to know which processes are running with:

kill -l

Then we will look at the number of the process that is causing us problems and we will close it:

kill -l 5


With MAN followed by the command you want, you will get the necessary help, as well as different combinations of the command in question:

man du


Used to change the user, it will ask you for the password to make the change:

su other_user


With this command you will exit the terminal and close it:


Remember that with the dates (above and below) you will get a history of everything you have typed in the terminal, this way, you will save yourself from typing it again.