For those who use Linux, the terminal is a fundamental tool. With it, you can configure various packages, update the system, edit files, and even access other systems remotely.
For experienced Linux lovers and IT professionals, the ability to configure any service using the terminal becomes advantageous as it speeds up the process, allowing the use of scripts and plugins to easily perform tedious tasks.
Although this command list is intended for Linux, most of them can be used in other operating systems, such as macOS and other BSD-based systems.
The cd command is used to navigate between directories in the system. Its basic structure is:
You can use ~ to navigate to the user’s default directory:
You can use … to navigate to the directory above the current one:
This command returns the path to the current directory.
This command lists the files and folders in the current directory.
This command copies files. Its basic structure is:
If you need to copy entire directories, you need to use the -r (recursive) argument:
This command moves files. Its basic structure is:
If you need to move entire directories, you need to use the -r (recursive) argument:
This command removes files. Its basic structure is:
If you need to remove entire directories, you need to use the -r (recursive) argument:
This command creates directories. Its basic structure is:
This command removes directories. Its basic structure is:
Please note that this command, unlike rm -r, can only remove empty directories by default.
Clears the terminal screen. You can also do this with the CTRL+L shortcut.
Opens the manual for the desired command. It is very useful when you want to understand what each argument of a command does. In general, it provides more detailed information than the command’s help argument (-h or –help). Its structure is:
To exit the manual, simply press the q key.
Lists the logged-in users, the interface they are using, and the time they logged in.
Shows how long the machine has been logged in and provides additional information. It is a very useful command on servers when you need to know if there has been a power outage or if the server has been restarted.
Allows a user to execute a command as a superuser (root). For this, the user must be part of the sudo group. Its basic structure is:
Allows you to log into the system as another user. Its basic structure is:
The grep command, by default, returns only the lines of a command with the searched keyword. It should be used in conjunction with a pipe (|), like this:
Displays the last executed commands.
Logs out of the session.
Creates a file. Its basic structure is:
Displays the contents of a file. Its basic structure is:
Returns the last lines of a file. It is very useful for reading log files, for example. Its basic structure is:
If you want to specify the number of lines to be returned, you need to use the -n argument followed by the number of lines:
Escolha como deseja entrar em contato com a Vertexa.
Informações enviadas!
Em breve entraremos em contato contigo via e-mail.
Choose your region