Authoritative guide to Common commands in Linux and Common commands in linux

Source: Internet
Author: User
Tags secure copy

Authoritative guide to Common commands in Linux and Common commands in linux


1 online query and help commands (2)
1. manman [Option] [command]: View Command help, command dictionary, more complex info, but not commonly used. # Man cd
-A: displays all the manual pages, not just the first one.
-F only displays the command function, not the detailed description file, which is the same as the whatis command.
-W: No manual content is displayed. Only the location of the file to be formatted and displayed is displayed.
2. helphelp [Option] [command] to view the help of the Linux built-in command. Help cd
-D: display the brief topic description of the command.
-S: display the brief syntax description of the command
File and directory operation commands (18)
1. ls full list, which is used to list the contents of a directory and its content attributes.
-L in addition to the file name, the File Permission, owner, file size, and other information are listed in detail.
-A,-all: list all files in the directory, including hidden files starting.
2. change directory in cd. The function is to switch from the current working directory to the specified working directory.
3. cp full copy, which is used to copy files or directories.
4. find: searches for directories and files under directories.
5. mkdir: make directories. Its function is to create a directory.
6. The music video can be moved in full mode. The function is to move or rename a file.
7. pwd print working directory. Its function is to display the absolute path of the current working directory.
8. rename is used to rename a file.
9. rm remove, which is used to delete one or more files or directories.
10. rmdir remove empty directories to delete empty directories.
11. touch creates a new empty file and changes the timestamp attribute of the existing file.
12. The tree function displays contents in a directory in a tree structure.
13. basename displays the file name or directory name.
14. dirname: displays the file or directory path.
15. chattr changes the extended attributes of the file.
16. lsattr view the file extension attributes.
17. file: Type of the file to be displayed.
18. md5sum calculates and verifies the MD5 value of the file.
3. Command for viewing files and content processing (21)
1. cat works in concatenate to connect multiple files and print them to screen output or redirect them to a specified file.
2. tactac is the reverse spelling of cat, so the command function is to reverse display the file content.
3. more display the file content on pages.
4. The less page displays the file content, which is the opposite of the more command.
5. The head displays the header of the file content.
6. tail displays the end Of the File Content
7. cut splits each line of the file by the specified separator and outputs
8. split the file into different small fragments.
9. paste merge file content by row
10. sort sorts the text content of a file.
11. uniq remove duplicate rows
12. The number of lines, words, or bytes of the wc statistics file.
13. iconv conversion file encoding format
14. dos2unix converts a DOS file to a UNIX file.
15. diff is used to compare the differences between different files. It is often used in text files.
16. vimdiff command line visual file comparison tool, commonly used in text files.
17. rev reverse output file content.
18. grep/egrep: Filter string.
19. join is merged based on the same fields of the two files.
20. tr replace or delete characters.
21. vi/vim Command Line Text Editor
4. File compression and decompression commands (4)
1.tar package Compression
2. unzip and decompress the file.
3.gzip gzip compression tool.
4.zip compression Tool
5. Information Display command (11)
1. uname command for displaying operating system information
2. the hostname displays or sets the Host Name of the current system.
3. dmesg displays the boot information for diagnosing system faults.
4. uptime displays the system running time and Load
5. stat displays the file or file system status
6. du computing disk space usage
7. df reports disk space usage of the file system
8. top real-time display of system resource usage
9. free view system memory
10. date: Display and set the system time
11. cal: View calendar and other time information
6. File SEARCH Command (4)
1. which searches for binary commands by PATH of the environment variable.
2. find searches for files or directories from the disk.
3. whereis searches for binary commands by PATH of the environment variable.
4. Use the/var/lib/mlocate. db command to update the database.
7. User management commands (10)
1. Add a user using useradd.
2. Modify the existing user attributes of the system using usermod.
3. delete a user using userdel.
4. Add groupadd user groups.
5. passwd to change the user password.
6. The validity period of the chage user password change.
7. view the uid, gid, and user group of the user.
8. su switches user identities.
9. Compile do exclusive command for editing the/etc/sudoers file.
10. sudo uses another user identity (Default root User) to execute commands allowed in the sudoers file beforehand.
Basic network operation commands (11)
1. telnet Remote logon using the TELNET protocol.
2. ssh remote logon using the SSH encryption protocol.
3. scp all-in-one secure copy, used to copy files between different hosts.
4. download the file through the wget command line.
5. ping to test the network connectivity between hosts.
6. route displays and sets the route table of the linux system.
7. ifconfig command for viewing, configuring, enabling, or disabling network interfaces.
8. ifup starts the NIC.
9. ifdown: Disable the NIC.
10. view the network status with netstat.
11. view the network status on the ss.
9 in-depth network operation commands (9)
1. nmap network scan command.
2. lsof full name list open files, that is, list files already opened in the system.
3. send and receive emails by mail.
4. mutt mail management command.
5. nslookup interactive query of Internet DNS commands.
6. The dig looks up the DNS resolution process.
7. host query DNS commands.
8. traceroute tracks the route of data transmission.
9. tcpdump command line packet capture tool.
10 commands on disks and file systems (16)
1. mount the file system.
2. umount unmount the file system.
3. fsck checks and fixes the Linux File System.
4. dd converts or Copies files.
5. dumpe2fs export ext2/ext3/ext4 file system information.
6. dumpext2/3/4 file system backup tool.
7. fdisk partition command, applicable to disk partitions under 2 TB.
8. The parted disk partition command does not limit the disk size. It is usually used for Disk Partitions below 2 TB.
9. Create a Linux File System in mkfs format.
10. partprobe updates the hard disk partition table information of the kernel.
11. e2fsck checks ext2/ext3/ext4 file systems.
12. Create a Linux swap partition using mkswap.
13. Enable swap partition for swapon.
14. swapoff disable swap partition.
15. sync writes data in the memory buffer to the disk.
16. Adjust the size of the ext2/ext3/ext4 File System by resize2fs.
11 system permissions and user authorization commands (4)
1. chmod changes the file or directory permissions.
2. chown changes the owner and group of the file or directory.
3. Change the file user group using chgrp.
4. umask displays or sets the permission mask.
12 Command for viewing system user login information (7)
1. whoami displays the current valid user name, which is equivalent to executing the id-un Command.
2. who displays the user information of the current logon system.
3. w: displays the list of users that have logged on to the system and the commands that the user is executing.
4. last displays the users logged on to the system.
5. lastlog displays the last logon information of all users in the system.
6. users: displays the list of all users currently logged on to the system.
7. finger searches for and displays user information.
Thirteen built-in commands and others (19)
1. echo prints the variable or directly outputs the specified string
2. printf formatted the result and output it to the standard output.
3. rpm command for managing rpm packages.
4. yum automatically and easily manages rpm package commands.
5. watch periodically executes the given command and displays the command output in full screen mode.
6. Set the system alias in alias.
7. unalias cancels the system alias.
8. View or set the system time on date.
9. clear the screen.
10. view the history of command execution in history.
11. The optical drive is displayed.
12. time calculates the command execution time.
13. Powerful nc network tools.
14. xargs converts standard input to command line parameters.
15.exe c calls and executes commands.
16. set or display environment variables for export.
17. unset deletes variables or functions.
18. type is used to determine whether another command is a built-in command.
19. bc command line scientific calculator
14 system management and performance monitoring commands (9)
1. chkconfig manages Linux boot items.
2. vmstat virtual memory statistics.
3. mpstat displays the status statistics of each available CPU.
4. iostat Statistics System IO.
5. sar comprehensively obtains performance data of the system, including CPU, Operation queue, disk I/O, paging (SWAP zone), memory, CPU interruption, and network.
6. ipcs is used to report the status of inter-process communication facilities in Linux. The displayed information includes the message list, shared memory, and semaphore information.
7. ipcrm is used to delete one or more message queues, semaphore sets, or shared memory IDs.
8. 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, signal transmission, and process status changes.
9. The ltrace command traces the library function calls of a process, and shows which library function is called.
10. Command for shutting down, restarting, canceling, and viewing system information (6)
1. shutdown.
2. halt shutdown.
3. Power off the power supply.
4. log out of the currently logged-on Shell.
5. exit the Shell that is currently logged on.
6. Press Ctrl + d to exit the current logon Shell shortcut.
16th process management commands (15)
1. bg changes a command paused in the background to continue (executed in the background ).
2. fg transfers the commands in the background to the foreground to continue running.
3.jobs: Check the number of commands currently running in the background.
4. kill and terminate the process.
5. killall terminates the process through the process name.
6. pkill terminate the process by process name.
7. crontab scheduled Task Command.
8. ps displays the process snapshot.
9. The pstree tree shows the process.
10. nice/renice adjusted the program running priority.
11. nohup ignores pending signals and runs the specified command.
Pgrep finds the matching process.
Runlevel: view the current running level of the system.
Init switches the running level.
The service also displays the current status of all system services.

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.