1. Manipulating Directory Commands  CD directory name to switch or enter the directory; For example, Cd/var switches to a directory named Var under the root directory; CD Mydir Enter Mydir directory under current directory  CD- return to the directory before entering this directory   ;  CD. back to previous level  CD ~ & nbsp; returns the current user home directory mkdir [parameter] directory name Create a directory; For example mkdir newdir create a directory named Newdir parameters:-P recursive creation  LS [Parameters] list files and directories in the current directory & nbsp; Parameters:-l display file and directory details  -A Show hidden files and directories &N Bsp  -LH display filesand directory details and display size units
2. Commands for manipulating FilesTouch file name Create a new file cat file name to view the contents of the file, from beginning to end to display the file contents; Space page DOWN, b page UP, q exit head [parameter] file name displays the contents of the head of the document parameter:-n Display file header n line ln-s source file destination file Create a soft link (shortcut), note that the file must write an absolute path
3. Commands that can be manipulated by files and directories COPY: CP [parameter] source file/source directory target file parameter:-r copy directory &NBSP ; -p even file with properties copy &NBSP ; -d If the source file is a linked file, copy the link file properties &NB Sp  -F mandatory Copy catalog: CP-RF source directory Target location & nbsp Copy files: CP source files Target location Cut or rename: MV source file/source directory target location & nbsp Cut directory: MV Source directory target location cut file: MV Source file target location Delete: RM [parameters] File/directory parameters:-R Delete directory &NBS P  -F mandatory Delete directory: R M -RF Directory name Delete file: RM file name
4. Compressing and decompressing tar format      TAR-CF Test.tar test Package The test directory as a tar grid Test.tar files tar-tvf Test.tar View files that are included in the tar format file & nbsp      TAR-XVF Test.tar Unzip Test.tar file in tar format GZ format & NBSP;   TAR-ZCVF test.tar.gz test compress the test directory into GZ format test.tar.gz file    TAR-ZXVF test.tar.gz Unzip the test.tar.gz file in GZ format bz2 format &NBSP ; TAR-JCVF test.tar.bz2 test Compress test directory into bz2 format test.tar.bz2 file TAR-JXVF test.tar.bz2 Unzip test.tar.bz2 file in bz2 format zip format Zip-r Test.zip Test Compress the test directory into a zip-format test.zip file Unzip Test.zip Unzip the Test.zip file in the ZIP format & nbsp
5. Find CommandsThe Whereis program name locates the path of the program name and detects the program's Help document location Find-name file name Find location
6. Permission ActionsChown 777 Test Set 777 permissions to test file Chown-r www Test modify test file owner for www chgrp-r www modify test file owning Group is www
7. User Managementuseradd test to add a test user
passwd test set or modify test password Userdel Test delete test user userdel-r test Delete test user while deleting test home directory
8. Shutdown. restartShutdown shutdown-h Now (root user is available) halt init 0 Restart Shutdown-r Now (can be used by root user) Reboot init 6
Linux Common commands