Authoritative Guide to common commands for Linux systems

Source: Internet
Author: User
Tags clear screen semaphore terminates secure copy


"One" on-line enquiry and Help commands (2)
1.manman [Options] [command] View command Help, Dictionary of commands, more complex and info, but not commonly used. #man CD
-A displays all manual pages, not just the first
-F Displays only the command function, not the detailed description file, same as the Whatis command
-W does not display manual content, only the location of the file that will be formatted and displayed
2.helphelp [Options] [command] See Help for Linux built-in commands. Help CD
-d Display command short topic description
-S Display command short syntax description
"II" File and Directory Operations Command (18)
1.ls full list, the function is to list the contents of the directory and its content property information.
-l lists the permissions, owner, file size, and so on, in addition to the file name.
-a,–all lists all files under the directory, including the. The implied file at the beginning
2.CD All-in-one directory with the ability to switch from the current working directory to the specified working directory
3.CP full copy, its function is to copy files or directories.
4.find find means to find files in directories and directories.
5.mkdir full make directories, its function is to create a directory.
6.MV All-in-one move with the ability to move or rename files.
7.PWD full Print working directory with the ability to display an absolute path to the current working directory.
8.rename is used to rename files.
9.RM full Remove, its function is to delete one or more files or directories.
10.rmdir full Remove empty directories, function is to delete empty directory.
11.touch creates a new empty file, changing the timestamp property of an existing file.
The 12.tree function displays the contents of the directory in a tree-shaped structure.
13.basename Displays the file name or directory name.
14.dirname displays the file or directory path.
15.chattr changes the extended properties of the file.
16.lsattr view file extension properties.
17.file displays the type of file.
18.md5sum calculates and verifies the MD5 value of the file.
"Three" view file and Content processing commands (21)
1.cat full concatenate, function is used to connect multiple files and print to the screen output or redirect to the specified file.
2.tactac is the inverse spelling of cat, so the function of the command is to display the contents of the file in reverse.
3.more pagination Displays the contents of the file.
4.less pagination shows the file contents, the opposite usage of the more command.
5.head displays the header of the file contents.
6.tail Displays the end of the file content
7.cut splits each line of a file by a specified delimiter and outputs
8.split split files for different small fragments
9.paste merging file contents by row
10.sort sorting the text content of a file
11.uniq Removing duplicate rows
The number of rows, words, or bytes of a 12.wc statistic file.
Encoding format for 13.ICONV conversion files
14.dos2unix convert DOS format files to UNIX format.
15.diff full difference, compare file differences, often used in text files.
16.vimdiff command line Visual file Comparison tool, commonly used in text files.
17.rev Reverse output file contents.
18.grep/egrep filter string, Three musketeers old three.
19.join merges in the same field as two files.
20.tr Replace or delete characters.
21.vi/vim Command line Text editor
"Four" file compression and Decompression commands (4)
1.tar Packaging compression
2.unzip unzip the file.
3.gzipgzip compression tool.
4.zip Compression Tool
"Five" Information display command (11)
1.uname commands for displaying operating system-related information
2.hostname displays or sets the host name of the current system
3.DMESG Display boot information for diagnosing system failures
4.uptime Display system run time and load
5.stat displaying the status of a file or file system
6.DU calculation of disk space usage
7.DF reporting of File system disk space usage
8.top real-time display of system resource usage
9.free Viewing system memory
10.date display and set system time
11.cal viewing time information such as calendars
"Six" Search File command (4)
1.which find binary command, search by environment variable path PATH.
2.find looking up files or directories from disk traversal.
3.whereis find binary command, search by environment variable path PATH.
4.locate finds commands from the database (/var/lib/mlocate/mlocate.db) and updates the library with UpdateDB.
"Seven" User Management commands (10)
1.useradd Add user.
2.usermod modifies user attributes that already exist on the system.
3.userdel Delete the user.
4.groupadd Add user groups.
5.PASSWD Modify user password.
6.chage Modify the user password validity period.
7.id View the user's Uid,gid and attribution user group.
8.su Switch User identity.
9.visudo Edit the/etc/sudoers file's exclusive command.
10.sudo performs the command previously permitted in the sudoers file as another user (default root user).
"Eight" basic Network Operation command (11)
1.telnet Remote login using Telnet protocol.
2.SSH telnet using SSH encryption protocol.
3.SCP full secure copy for copying files between different hosts.
4.wget command line download file.
5.ping test the connectivity of the network between hosts.
6.route displays and sets the routing table for the Linux system.
7.ifconfig commands to view, configure, enable, or disable network interfaces.
8.ifup start the network card.
9.ifdown turn off the NIC.
10.netstat View network status.
11.SS View network status.
"Nine" Deep Network Operation command (9)
1.nmap Network Scan command.
2.lsof Full Name list open files, which is the file that is listed in the system that has already been opened.
3.mail send and receive messages.
4.mutt Mail management commands.
5.nslookup Interactive query for Internet DNS server commands.
6.dig find the DNS resolution process.
7.host queries the DNS command.
8.traceroute tracks data transmission routing status.
9.tcpdump command-line grab kit.
X. Commands for disk and file systems (16)
1.mount mount file System.
2.umount unmount the file system.
3.FSCK check and repair the Linux file system.
4.dd convert or copy files.
5.DUMPE2FS Export EXT2/EXT3/EXT4 file system information.
6.DUMPEXT2/3/4 File System Backup tool.
7.fdisk disk Partitioning command for 2TB of the following disk partitions.
The 8.parted disk partitioning command, with no disk size limit, is commonly used for disk partitions below 2TB.
9.MKFS format creates a Linux file system.
10.partprobe update the kernel's hard disk partition table information.
11.E2FSCK Check the EXT2/EXT3/EXT4 type file system.
12.mkswap Create a Linux swap partition.
13.swapon enable the swap partition.
14.swapoff closes the swap partition.
15.sync writes the data in the memory buffer to disk.
16.RESIZE2FS Adjust the Ext2/ext3/ext4 file system size.
"11" System permissions and user authorization related commands (4)
1.chmod change file or directory permissions.
2.chown change the owner and owner of a file or directory.
3.chgrp Change file user group.
4.umask Displays or sets the permission mask.
"12" To view the system user login Information command (7)
1.whoami Displays the currently valid user name, which is equivalent to executing the id-un command.
2.WHO displays user information for the currently logged in system.
3.W displays a list of users who have logged in to the system and displays the instructions that the user is executing.
4.last Displays the user who logged into the system.
5.lastlog displays the last logon information for all users in the system.
6.users displays a list of users for all users who are currently logged on to the system.
7.finger finds and displays user information.
"13" built-in Commands and others (19)
1.echo print variable, or direct output of the specified string
2.PRINTF formats the results to standard output.
3.rpm commands for managing RPM packages.
4.yum Automation simplifies the management of RPM package commands.
The 5.watch periodically executes the given command and displays the output of the command in full-screen mode.
6.alias sets the system alias.
7.unalias cancels the system alias.
8.date view or set the system time.
9.clear clear the screen, for short, clear screen.
10.history View the history of the command execution.
11.eject eject the optical drive.
12.time calculates the command execution time.
13.NC Powerful Network Tools.
14.xargs converts the standard input to a command-line parameter.
15.exec command to invoke and execute the instruction.
16.export Sets or displays environment variables.
17.unset delete a variable or function.
18.type is used to determine if another command is a built-in command.
19.BC Command Line Scientific calculator
"14" system management and performance monitoring commands (9)
1.chkconfig Manage Linux system boot entry.
2.vmstat Virtual memory statistics.
3.MPSTAT displays status statistics for each available CPU.
4.iostat statistical System IO.
5.sar comprehensively obtains performance data such as CPU, run queue, disk I/O, paging (swap area), memory, CPU interrupt, and network of the system.
6.ipcs is used to report the status of interprocess communication facilities in Linux, and the information displayed includes information about the message list, shared memory, and semaphore.
7.IPCRM is used to delete one or more message queues, semaphore sets, or shared memory identities.
8.strace is used to diagnose and debug Linux User space Tracker. We use it to monitor user space processes and kernel interactions, such as system invocation, signal delivery, process state changes, and so on.
The 9.ltrace command tracks the library function call of the process and it shows which library function is called.
"XV" command to shut down/restart/logout and view system Information (6)
1.shutdown shut down the machine.
2.halt shut down the machine.
3.poweroff power off.
4.logout exits the currently logged-on shell.
5.exit exits the currently logged-on shell.
6.ctrl+d the shortcut key to exit the currently logged-in shell.
"16" Process Management related commands (15)
1.bg a command that pauses in the background to continue execution (performed in the background).
2.FG the commands in the background are moved to the foreground to continue running.
3.jobs See how many commands are currently running in the background.
4.kill terminates the process.
5.killall terminates the process through the process name.
6.pkill terminates the process through the process name.
7.crontab timed Task command.
8.ps shows a snapshot of the process.
9.pstree Tree display process.
10.nice/renice adjusts the priority of the program to run.
11.nohup ignores the pending signal to run the specified command.
Pgrep finds the process that matches the condition.
RunLevel View the current operating level of the system.
Init toggles the run level.
The service starts, stops, restarts, and shuts down system services, and it also displays the current status of all system services.

Authoritative Guide to common commands for Linux systems

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.