linux operating system 2 linux common commands

Note under Linux system:

Linux systems are case sensitive!

 

 

ls

Brief description: ls is the abbreviation of list, which is used to list the specified directory or file

1  ls Lists files and directories in the current directory. No hidden files
 2 ls - a List all files and directories in the current directory, including hidden files
 3 ls - l List detailed information (excluding hidden files)
 4 ls /home/ List files and directories in the specified directory

 

 

mkdir

Brief description: mkdir is the abbreviation of make directory, which is used to create directories

1 mkdir -p creates multi-level directories at one time

 

 

cd

Brief description: cd is the abbreviation of change directory, which is used to change the directory where the user is located.

Enter the root directory of the current user without anything after cd. The root directory of the root user is /root, and the root directory of other users is the user directory under the home directory.

If cd is followed by a directory name, it will directly switch to the specified directory, but cd cannot be followed by a file name, and an error will be reported if there is a file name!

Note: In Linux, . represents the current directory, and .. represents the upper-level directory of the current directory, so cd. is to enter the current directory, and cd.. is to enter the upper-level directory

 

 

pwd

Brief description: pwd is the abbreviation of print work directory, which is used to print the current working directory

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324884377&siteId=291194637