One, cd command
Cd--change directory is the transform catalog.
CD absolute path or relative path
CD ~ User indicates to this user's home directory, i.e./home/user
CD ~ means to return to your home directory, which is the/root directory
CD means back to your home directory
Cd.. Returns to the last directory
Second, ls command
Ls--list lists the files in the current directory.
Ls-l is a Long data serial that lists files, including data such as attributes and permissions (common)
Ls-a indicates that all files are listed, together with the hidden (beginning with.) Listed together
Ls-a indicates that all files are listed, together with hidden, but not included. and. These two directories
Ls-h indicates that the listed files are in the size of the list,
Ls-r indicates reverse output of the result
Ls-t means sorting by time, without the document name
Third, the Linux environment variable
Before the introduction of environment variables need to explain a directive which, because from the know LS can query the file, but how to query ls? It's going to use Which,which ls. You can see the path where LS is located, which is an absolute path.
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/88/81/wKiom1f5-5KyOx0qAAAGQwXjMmU091.png-wh_500x0-wm_3 -wmp_4-s_603848454.png "title=" qq picture 20161009161042.png "alt=" Wkiom1f5-5kyox0qaaagqwxjmmu091.png-wh_50 "/>
After entering the LS instruction, the file will show a different color, which is why? The reason in this instruction, alias ls= ' Ls-color=auto '/bin/ls, means that the input ls command, different files will show a different color, automatically generated, and the absolute path of the instruction is/bin/ls. However, the usual input instruction does not enter an absolute path, just enter the instruction directly. What is this for? Now you need to learn a command echo $PATH, echo is printed meaning, and the $ in front of PATH indicates that the variable is followed.
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/88/7E/wKioL1f6AAKxROz5AAAJclbqAoQ891.png-wh_500x0-wm_3 -wmp_4-s_870534739.png "title=" qq picture 20161009162925.png "alt=" Wkiol1f6aakxroz5aaajclbqaoq891.png-wh_50 "/>
It is known that there is/bin in path, so the input LS can be found. If you move LS to the bottom of the/root/, and then the CD to/root/, execute LS, you will find that the execution is not, because there is no/root directory under path, if the LS is moved under the/root, the system cannot find the executable file, so it will show command not Found Then we know that this is because the PATH environment variable is playing a role.
Of course, this environment variable can also be re-set, and additions and deletions are also possible.
Five, shortcut keys
The TAB key is a more commonly used shortcut key, it is the role of the completion of the file name or path. For example, enter "Cd/ho" in the Click Tab key, the terminal will show "Cd/home".
Ctrl+l Clear Screen
Ctrl+d Exit =exit=logout
CTRL + A: Position the cursor at the beginning of the line
Ctrl+e: Position the cursor at the end of the line
Ctrl+u found the command was wrong, quickly cleared
CTRL + C direct Cancel, force interrupt
CTRL + Z Pause process, can say FG recovery
Ctrl+s lock a line in the splash screen
Ctrl+q Unlock splash screen vs. ctrl+s
Linux Common Commands Cd&ls&path