In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what Linux commands you must understand, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1.ls-Listls lists the contents of the current working directory (files or folders), just as you open a folder in GUI to see the contents.
A common new directory for 2.mkdir-Make Directorymkdir
3.pwd-Print Working Directorypwd displays the current working directory
4.cd-Change Directory for the meeting currently running on the terminal, cd sets the given folder (or directory) to the current working directory.
5.rmdir-Remove Directoryrmdir deletes the given directory.
6.rm-Removerm deletes a given file or folder, which can be deleted recursively using rm-r
The 7.cp-Copycp command copies files or folders, and you can use the cp-r option to copy folders recursively.
The 8.mv-MoVemv command moves files or folders and renames them if they exist in the current working directory.
9.cat-concatenate and print filescat is used to view the contents of a file on standard output (monitor or screen).
10.tail-print TAIL (from last) > tail displays the * 10 lines of a given file on the standard output by default, and you can use tail-n N to specify that the * N lines of the file are displayed on the standard output.
11.less-print LESSless prints the contents of the file by page or by window. It is very useful and efficient when viewing large files that contain a lot of text data. You can use Ctrl+F to turn the page forward and Ctrl+B to turn the page backward.
12.grepgrep "" searches the given file for the specified string. Grep-I "" ignores the case of the string when searching, while grep-r "" recursively searches for the specified string in the files in the current working directory.
13.Find
This command searches for files that match the criteria at the given location. You can use the-name option of find-name for case-sensitive searches and find-iname for case-insensitive searches.
Find-iname
The 14.tartar command creates, views, and extracts tar compressed files. Tar-cvf creates the corresponding compressed file, tar-tvf to view the corresponding compressed file, and tar-xvf to extract the corresponding compressed file.
The 15.gzipgzip command creates and extracts gzip compressed files, and you can also use gzip-d to extract compressed files.
16.unzipunzip decompresses the gzip document. Before decompressing, you can use the unzip-l command to view the contents of the file.
17.help-- help lists all available commands on the terminal, and you can use the-h or-help options of any command to see the specific usage of the command.
18.whatis-What is this commandwhatis describes a given command in a single line.
19.man-Manualman displays a manual page for the given command.
20.exitexit is used to end the current terminal session.
21.pingping sends packets to ping remote hosts (servers), commonly used to detect network connections and server status.
22.who-Who Is logged inwho lists the user name currently logged in.
23.su-Switch Usersu is used to switch between different users. Even if you don't use a password, the superuser can switch to another user.
24.unameuname displays important information about the system, such as kernel name, hostname, kernel version, processor type, and so on, all of which can be viewed using uname-a.
25.free-Free memoryfree shows the system's free memory, occupied memory, available swap memory, and so on. Free-m converts the units in the result to KB, while free-g converts to GB.
26.df-Disk space Freedf looks at disk usage in the file system-the storage space used and available on the hard disk, as well as other storage devices. You can use df-h to display the results in a human-readable manner.
27.ps-ProcesseSps shows the running process of the system.
The 28.Top-TOP processestop command shows the processes with a large amount of usage by default according to the occupancy of CPU, and you can use top-u to check the ranking of a user's CPU usage.
29.shutdownshutdown is used to shut down the computer, while shutdown-r is used to restart the computer.
The above is all the contents of the article "what are the Linux commands you must know?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.