Basic commands on Linux 1/2

This tutorial allows you to take charge of your Linux system from basic commands (part 1/2).

cd

The command cd allows the navigation between different folders of the system.

Command to get to the connected user’s directory.

Command to get to directory /path/folder.

Command to get to the disk root.

Command to get to the parent directory of your current location.

Command to come back to the previous directory.

Command which displays the absolute path of the current directory.


mv

The command mv allows to rename and move files and folders.

Argument to move a file/folder and overwrite it if it is already existing.

Argument to move a file/folder and display it.


cp

The command cp allows to copy files and folders.

Argument to copy a folder (recursively).

Argument to copy a file/folder while retaining all the rights (owner, group, chmod, …)


rm

the command rm allows to delete files and folders.

Argument to delete a directory’s content.

Argument to delete a file/folder whether it is existing or not.

Argument to delete a file/folder and display it.

Argument to delete a file/folder with the user’s confirmation (‘y’ or ‘n’).


mkdir

The command mkdir allows to create folders.
It is possible to create several folders with only one command or a complete arborescence.

Argument of creation and displaying of the created folders.

Argument of creation of a folder arborescence.


ls

The command cd allows to list a folder’s content.

To display a folder’s content, including the files starting with a point.

To sort of a folder’s content according to seniority.

Detailed displaying of a folder, including the number of files.

Reversed displaying of a folder.


grep

The command grep allows to conduct research in a file.

To search for the string in a folder’s content.

To indicate the line and the file containing the string.

To count the number of lines containing the string.

To search for without being sensitive to the case (lowercase/uppercase).

To display lines not containing the research.


Basic commands on Linux 1/2
Vote