1. man provides help explanations for familiar or unfamiliar commands For example: man ls, you can view the ls-related usage. Note: Press q or ctrl + c to exit. in linux, you can use ctrl + c to terminate the current program. 2. ls view the directory or file owner * and list the files under any directory Eg: ls/usr/man Ls-l A. d indicates the directory. If it is a "-", it indicates a file. If it is l, it indicates a connection file (link) B. Permission for file or directory permission. Read (r), write (w), and run (x) respectively ). 3. Copy files using cp Eg: cp filename1 filename2 // copy filename1 to filename2 Cp 1.c netseek/2.c // copy 1.c to the netseek directory and name it 2.c. 4. rm delete files and directories Eg: rm 1.c // Delete the. c file. 5. Remove the directory or change the file name. Eg: mv filename1 filename2 // rename filename1 to filename2 Mv qib. tgz ../qib. tgz // move to the upper-level directory 6. Change the current directory pwd on cd to view the complete path of the current directory Eg: pwd // view the current directory path Cd netseek // enter the netseek directory Cd // exit the current directory 7. cat, more command Displays the content of a file. The two commands are different: cat prints the file content all the time, and more is displayed on the split screen. For example; cat> 1.c // You can paste the code into the. c file and press ctrl + d to save the code. Cat 1.c or more 1.c // you can view the content in it. Gcc-o 1 1.c // compile 1.c into the. exe file. We can compile the Code with this command. 8. Modify the chmod command permission usage: chmod one-digit octal number filename. Eg: chmod u + x filenmame // you only want to run the command for yourself. // U indicates the file owner. g indicates the group of the file. O indicates others; r table readable; w table writable; x Tables can run Chmod g + x filename // the same group of people to execute 9. clear, date command Clear: clear screen, equivalent to cls in DOS; date: displays the current time. 10. mount a hardware device Usage: mount [parameter] device load point to be loaded Eg: mount/dev/cdrom Cd/mnt/cdrom // enter the cd directory 11. su switches to another person's identity without logging out. Usage: su-l user name (if the user name defaults, the user name is switched to the root state) Eg: su-l netseek (switch to the netseek user and the user will be prompted to enter the password) 12. whoami, whereis, Which, ID // Whoami: confirm your identity // Whereis: queries the directory where the command is located and the directory where the help document is located // Which: query the directory where the command is located (similar to whereis) // ID: print your UID and GID. (UID: the unique ID of a user. GID: the unique ID of a user group. Each A user can only have one unique UID and gid) Eg: whoami // display your login user name Whereis bin: the directory where the bin is located. The directory is/usr/local/bin. Which Bin 13. grep, find Grep: Text Content Search; find: file or directory name and permission owner matching search Eg: grep success * /* Find all files in the current directory that contain success characters 14. Kill can kill a running or DEST process. Eg; PS ax 15. passwd can be used to set a password 16. commands used by the history user Eg: History // displays the commands used by the user in the past. 17 .!! Execute the last command 18. mkdir command Eg: mkdir netseek // create the netseek directory 19. Tar decompression command Eg: tar-zxvf nmap-3.45.tgz // extract this to the nmap-3.45 directory 20. finger allows users to query data of other users Eg: finger // view the user's usage information Finger root // view the root Information |