Skip to main content

Basic Linux Commands

Below are a list of commonly used linux commands that you will need to know as a Cyber Sentinel cadet. These commands will help you navigate the Linux file system and perform common file and directory operations.

LS - List directory contents​

The ls command is used to list the contents of a directory. It can be used to list files and directories in the current directory, or in a specified directory.

ls

CD - Change the current directory​

The cd command is used to change the current directory. It can be used to change to a specified directory, or to change to the home directory.

cd /path/to/directory

PWD - Print the name of the current working directory​

The pwd command is used to print the name of the current working directory. It can be used to display the full path of the current directory.

pwd

MKDIR - Make directories​

The mkdir command is used to make directories. It can be used to create one or more directories in the current directory, or in a specified directory.

mkdir directory

RMDIR - Remove empty directories​

The rmdir command is used to remove empty directories. It can be used to remove one or more empty directories in the current directory, or in a specified directory.

rmdir directory

TOUCH - Create a file​

The touch command is used to create a file. It can be used to create one or more files in the current directory, or in a specified directory.

touch file

RM - Remove files or directories​

The rm command is used to remove files or directories. It can be used to remove one or more files or directories in the current directory, or in a specified directory.

rm file

CP - Copy files and directories​

The cp command is used to copy files and directories. It can be used to copy one or more files or directories to a specified directory.

cp file /path/to/directory

MV - Move or rename files or directories​

The mv command is used to move or rename files or directories. It can be used to move one or more files or directories to a specified directory, or to rename one or more files or directories.

mv file /path/to/directory

CAT - Concatenate and display file contents​

The cat command is used to concatenate and display file contents. It can be used to display the contents of one or more files in the current directory, or in a specified directory.

cat file