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.

CD

As the acronym of its name indicates, it is used to Cchange Ddirectory.

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 .

LS

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

ls

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

ls *.txt

It would show only files with the extension .txt

MKDIR

With this command you can create a directory:

mkdir new_directory

RMDIR

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

rmdir new_directory

MV

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

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

rm my_file
rm *

CLEAR

This command is used to clear the terminal screen:

clear

CP

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

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

df -h

DU

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

FIND

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

KILL

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

MAN

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

SU

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

su other_user

EXIT

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

exit

**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 **.

More than 2000 m² of own facilities and Data Centers in Spain
Your privacy is important for us
We use our own cookies for the proper functioning of the site. In addition, third-party cookies are used for analytical purposes only. This information is not associated with any person so that personal identifying data is not stored, but is only information that is collected to identify the session, with the aim of facilitating the analysis of the website. You can change your preferences at any time by entering this website again. For more information about our cookie policy you can visit our Cookies. You can press the "Accept and close" button to give us your consent or you can access more detailed information and manage cookies.
More than 2000 m² of own facilities and Data Centers in Spain
Your privacy is important for us
We use our own cookies for the proper functioning of the site. In addition, third-party cookies are used for analytical purposes only. This information is not associated with any person so that personal identifying data is not stored, but is only information that is collected to identify the session, with the aim of facilitating the analysis of the website. You can change your preferences at any time by entering this website again. For more information about our cookie policy you can visit our Cookies. You can press the "Accept and close" button to give us your consent or you can access more detailed information and manage cookies.