In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
What are the most commonly used commands in Linux? in response to this question, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Command function describes online query and help commands (2)
Man looks at command help, a dictionary of commands, and, more complex, info, but not often. Help looks for help with Linux built-in commands, such as the cd command. File and directory operation commands (18)
Ls spelling list, the function is to list the contents of the directory and its content attribute information. Cd spelling change directory, the function is to switch from the current working directory to the specified working directory. Cp spelling copy, its function is to copy files or directories. Find search means to find the directory and the files under the directory. Mkdir spells make directories in full, and its function is to create directories. Mv spelling move, its function is to move or rename files. Pwd spelling print working directory, its function is to display the absolute path of the current working directory. Rename is used to rename files. Rm spelling remove, its function is to delete one or more files or directories. Rmdir spells remove empty directories in full, and the function is to delete empty directories. Touch creates a new empty file and changes the timestamp attribute of the existing file. The tree function is to display the contents of the directory in a tree structure. Basename displays the file or directory name. Dirname displays the file or directory path. Chattr changes the extended properties of the file. Lsattr looks at the file extension properties. File displays the type of file. Md5sum calculates and verifies the MD5 value of the file. View file and content processing commands (21)
Cat spelling concatenate, the function is to connect multiple files and print to the screen output or redirect to the specified file. Tactac is the reverse spelling of cat, so the function of the command is to display the contents of the file in reverse. More pagination displays the contents of the file. Less pagination displays the contents of the file, the reverse use of the more command. Head displays the header of the contents of the file. Tail displays the tail of the contents of the file. Cut splits each line of the file by the specified delimiter and outputs it. Split splits the file into different small fragments. Paste merges the contents of the file by line. Sort sorts the text contents of the file. Uniq removes duplicate lines. Oldboywc counts the number of lines, words, or bytes of a file. Iconv converts the encoding format of the file. Dos2unix converts DOS format files to UNIX format. Diff spelling difference, compare the differences of files, often used in text files. Vimdiff command line visual file comparison tool, often used for text files. Rev outputs the contents of the file in reverse. Grep/egrep filter string, three Musketeers third. Join merges by the same fields of the two files. Tr replaces or deletes characters. Vi/vim command line text editor. File compression and decompression commands (4)
Tar packages and compresses. Oldboyunzip decompresses the file. Gzipgzip Compression tool. Zip Compression tool. Information display commands (11)
Uname commands that display information about the operating system. Hostname displays or sets the hostname of the current system. Dmesg displays boot information and is used to diagnose system faults. Uptime shows the running time and load of the system. Stat displays the status of the file or file system. Du calculates disk space usage. Df reports the use of disk space in the file system. Top displays the usage of system resources in real time. Free looks at the system memory. Date displays and sets the system time. Cal looks at calendar and other time information. Search file commands (4)
Which looks up the binary command by the path of the environment variable PATH. Find traverses from disk to find files or directories. Whereis looks up the binary command by the path of the environment variable PATH. Locate looks for commands from the database (/ var/lib/mlocate/mlocate.db) and updates the library using updatedb. User management commands (10)
Useradd add users. Usermod modifies user attributes that already exist in the system. Userdel deletes the user. Groupadd adds a user group. Passwd modifies the user's password. The validity period for chage to modify a user's password. Id looks at the user's uid,gid and the user group to which he belongs. Su switches user identities. Exclusive commands for visudo editing / etc/sudoers files. Sudo executes commands that are previously allowed in the sudoers file as another user (the default root user). Basic network operation commands (11)
Telnet logs in remotely using the TELNET protocol. Ssh logs in remotely using the SSH encryption protocol. Scp spelled secure copy, which is used to copy files between different hosts. Download the file from the wget command line. Ping tests the connectivity of the network between hosts. Route displays and sets the routing table of the linux system. Ifconfig commands to view, configure, enable, or disable network interfaces. Ifup starts the network card. Ifdown shuts down the network card. Netstat views the network status. Ss views the network status. Deep network operation commands (9)
Nmap network scan command. The full name of lsof is list open files, which lists the files that have been opened in the system. Mail sends and receives mail. Mutt message management commands. Nslookup interactive query commands for Internet DNS servers. Dig looks up the DNS parsing process. The command for host to query DNS. Traceroute tracks the routing of data transfers. Tcpdump command line package grabbing tool. Commands about disks and file systems (16)
Mount mounts the file system. Umount unmounts the file system. Fsck checks and repairs the Linux file system. Dd converts or copies files. Dumpe2fs exports ext2/ext3/ext4 file system information. Dumpext2/3/4 file system backup tool. Fdisk disk partition command, applicable to the following disk partitions of 2TB. The parted disk partition command, which has no disk size limit, is commonly used for disk partitions below 2TB. Mkfs format creates a Linux file system. Partprobe updates the hard disk partition table information of the kernel. E2fsck checks the ext2/ext3/ext4 type file system. Mkswap creates a Linux swap partition. Swapon enables swap partitions. Swapoff closes the swap partition. Sync writes the data in the memory buffer to disk. Resize2fs resizes the ext2/ext3/ext4 file system. Commands related to system permissions and user authorization (4)
Chmod changes file or directory permissions. Chown changes the owner and group of a file or directory. Chgrp changes the file user group. Umask displays or sets the permission mask. Commands to view system user login information (7)
Whoami displays the currently valid user name, which is equivalent to executing the id-un command. Who displays the user information that is currently logged in to the system. W displays a list of users who have logged in to the system and displays the instructions that the user is executing. Last shows the users who have logged in to the system. Lastlog displays the most recent login information for all users in the system. Users displays a list of all users currently logged into the system. Finger finds and displays user information. Built-in commands and other (19)
Echo prints variables, or directly outputs the specified string printf to format the results to standard output. Commands for rpm to manage rpm packages. Yum automates and simplifies the management of commands for rpm packages. Watch periodically executes the given command and displays the output of the command in full screen mode. Alias sets the system alias. Unalias cancels the system alias. Date views or sets the system time. Clear clears the screen, or clear the screen for short. History looks at the history of command execution. The eject ejects the optical drive. Time calculates the execution time of the command. Nc is a powerful network tool. Xargs converts standard input to command-line arguments. A command that exec calls and executes an instruction. Export sets or displays environment variables. Unset deletes a variable or function. Type is used to determine whether another command is a built-in command. Bc Command Line Scientific Calculator system Management and performance Monitoring commands (9)
Chkconfig manages the Linux system boot startup item. Vmstat virtual memory statistics. Mpstat displays status statistics for each available CPU. Iostat statistics system IO. Sar comprehensively acquires the performance data of the system, such as CPU, run queue, disk Imax O, paging (swap), memory, CPU interrupts, and network. Ipcs is used to report the status of interprocess communication facilities in Linux, including message lists, shared memory, and semaphores. Ipcrm is used to delete one or more message queues, semaphores, or shared memory identities. Strace is used to diagnose and debug the Linux user space tracker. We use it to monitor the interaction between user-space processes and the kernel, such as system calls, signaling, process state changes, and so on. The ltrace command tracks the library function calls of the process, and it shows which library function is called. Commands for shutdown / restart / logout and viewing system information (6)
Shutdown shuts down. Halt shuts down. The poweroff is powered off. Logout exits the currently logged in Shell. Exit exits the currently logged in Shell. The shortcut key for Ctrl+d to exit the currently logged in Shell. Process management related commands (15)
Bg changes a command that is paused in the background to continue execution (execution in the background). Fg transfers the commands in the background to the foreground to continue to run. Jobs to see how many commands are currently running in the background. Kill terminates the process. Killall terminates the process by its name. Pkill terminates the process by its name. Crontab scheduled task command. Ps displays a snapshot of the process. The pstree tree shows the progress. Nice/renice adjusts the priority at which the program runs. Nohup ignores the suspend signal to run the specified command. The process by which pgrep looks for matching criteria. Runlevel views the current runlevel of the system. Init switches the runlevel. Service starts, stops, restarts, and shuts down system services, and also displays the current status of all system services.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The answers to the questions about what are the most commonly used commands in Linux are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
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.