In the Linux system, a lot of operations are implemented through commands, the most basic is three commands, the equivalent of the mouse inside the windows of some of the actions, let's look at these three commands.
LS View the contents of the current directory, the equivalent of using the mouse to open a file to view the contents.
PWD View the current location, that is, the current directory, it will also list the path, so that you see how you get to this directory, the equivalent of you use the mouse to open a folder inside the path of another folder, more convenient than windows, good-looking.
The CD switches directories, that is, in the current directory, into other directories. This is equivalent to exiting the folder with your mouse and entering another folder.
In Linux, it follows the principle of the tree, all the files and directories are under the root, and this root with/to represent, that is, the root directory, such as:/root/desktop/a.txt in this path, only the first/is the root directory, the others are separators.
A complete command format includes
command word [options] [parameters]
In this option is the equivalent of your choice, you choose how to look, or choose how to operate.
The parameters can be multiple, that is, the target you are manipulating.
and the [] representative can be removed, that is, no options and parameters, such as: You play the LS command in the current directory, it will default to view the current directory.
The four most common options for LS are listed below
Ls-a: Includes the name with the. The beginning of the hidden document (generally viewed when the hidden document is not displayed, and in. To begin with)
Ls-d: Displays the properties of the directory itself
Ls-h: Provides easy-to-read capacity units
Ls-l: Display in long format
[Email protected] ~]# ls-l/root #显示目录下详细信息
[Email protected] ~]# ls-l/boot #显示目录下详细信息
[Email protected] ~]# ls-l-h/boot #显示目录下详细信息, plus units
[Email protected] ~]# ls-lh/boot #显示目录下详细信息, plus units
[email protected] ~]# man ls #查看ls命令的帮助手册信息
Cd-change Directory
– Purpose: Switch working directory
– Format: CD [Destination folder location]
Relative path: A path that does not start from the root directory
Absolute path: The path starting from the root directory
Cd.. Represents the parent directory, which is the previous level directory
Cd. Represents the current directory
Linux Three Musketeers ls pwd CD