Linux Common Commands Summary

Source: Internet
Author: User
Tags clear screen

Online Enquiry and Help commands (2)
Command Function description
Mans View command Help, Dictionary of commands, more complex and info.
Help See Help for Linux built-in commands.

/tr> Td>dirname
file and Directory operations commands (18)
Command function description
ls lists the contents of the directory and their content property information
cd switch from the current working directory to the specified working directory
cp copy files or directories
find for finding directories and items Recorded file
mkdir Create a directory
mv Move or rename a file
pwd Displays the absolute path of the current working directory
rename rename file
rm Delete one or more Files or directories
rmdir Delete empty directory
Touch Create a new empty file, change the time attribute of an existing file
Tree to display the contents of a directory in a TreeView
basename Show file name or directory name
to display a file or directory path
chattr Change the extended properties of a file
lsattr View extended Properties for a file
file displays the types of files
md5sum Calculating and verifying the MD5 value of a file

view file and content processing commands (21)
Command Function description
Cat Connect multiple files and print to the screen output or redirect to the specified file
Tac TAC is the reverse spelling of cat, displaying file contents in reverse
More Page display of file contents
Less Pagination shows the contents of a file, the opposite usage of the more command
Head Displays the header of the file class capacity
Tail Display the end of a file's contents
Cut Splits each line of a file by the specified delimiter and outputs it.
Split Split files into different small fragments
Paste Merge file contents by row
Sort Sort the text content of a file
Uniq Remove Duplicate rows
Wc The number of rows, words, or bytes of the statistics file.
Iconv encoding format for converted Files
Dos2unix Convert DOS format files to UNIX format
Diff Compare file differences
Vimdiff Command line visual file Comparison tool
Rev Reverse Output file contents
Grep/egrep Filter strings, one of the Three Musketeers
Join Merge by same field of two files
Tr Replace or delete characters
Vi/vim Command line Text Editor

File compression and Decompression commands (4)
Command Function description
Unzip Unzip the file
Gzip Gzip Compression Tool
Tar Packaging compression
Zip Compression tools

Information display commands (11)
Command Function description
Uname Commands to display information about the operating system
Hostname Displays or sets the host name of the current system
Dmesg Display boot information for diagnosing system failures
Uptime Display system run time and load
Stat Show the status of a file or file system
Du Calculate disk space usage
Df Report the use of file system disk space
Top Real-time display of system resource usage
Free viewing system memory
Date Display and set system time
Aa. View time information such as calendars

Search Files Command (4)
Command Function description
which Find binary commands, search by environment variable path path
Find To find a file or directory from a disk traversal
Whereis Find binary commands, search by environment variable path path
Locate Find commands from a database

User Management commands (10)
Command Function description
Useradd Add user
Usermod Modifying user attributes that already exist on the system
Userdel Delete User
Groupadd To add a user group
passwd Modify User Password
Chage Modify User Password Expiration
Id View user's Uid,gid and attribution user groups
Su Switch User identities
Visudo Exclusive commands for editing/etc/sudoers files
Sudo Perform the commands previously allowed in the Suders file as another user (the default root user).

Basic Network Operations Commands (11)
Command Function description
Telnet Remote Login using Telnet protocol
Ssh Remote login using SSH encryption protocol
Scp Used to copy files between different hosts
Wget Command line download file
Ping Test the network connectivity between hosts
Route Displaying and setting the routing table for a Linux system
Ifconfig To view, configure, start, or disable a network interface command
Ifup Start the network card
Ifdown Turn off the NIC
Netstat View network Status
Ss View network Status

Deep Network Operations Command (9)
Command Function description
Lsof Enumerate files that have been opened in the system
Mail Send and receive files
Mutt Mail Management commands
Nslookup Interactive query for Internet DNS server commands
Dig To view the DNS resolution process
Host To view DNS commands
Nmap Network Scan Command
Traceroute Track data transfer routing status
Tcpdump Command-line Grab Bag tool

commands for disks and file Systems (16)
Command Function description
Mount Mount File System
Umount Uninstalling the file system
Fack Check and repair the Linux file system
Dd converting copied files
Dumpe2fs Export File System Information
Dump File System Backup Tool
Fdisk Disk partitioning command, for 2TB or less disk partitions
Parted Disk partitioning command, no disk size limit, commonly used for 2TB or less disk partitions
Mkfs Format and create a Linux file system
Partprobe Update the disk partition table information for the kernel
E2fsck Check the EXT2/EXT3/EXT4 type file system
Mkswap Creating a Linux Swap partition
Swapon Enable swap partition
Awapoff Close Swap partition
Sync To write data from a memory buffer to disk
Resize2fs Resizing the Ext2/ext3/ext4 file system

System permissions and user authorization related commands (4)
Command Function description
chmod Change file or directory permissions
Chown Change the owner and owner of a file or directory
Chgrp Change file User Group
Umask Display or set a permission mask

Commands to view system user login information (7)
Command Function description
WhoAmI Displays the currently valid user name, equivalent to executing the id-un command
W.H.O. Displays user information for the current login system
W Displays a list of users who have logged in to the system and displays the instructions that the user is executing
Last Show users 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 of the current login system
Finger Find and display user information

built-in commands and other
Command Function description
Echo Prints the variable, or outputs the specified string directly
Printf Format the results to standard output
Rpm Manage RPM Package Commands
Yum Commands for automating the easy management of RPM packages
Watch Executes the given command periodically and displays the output of the command in full-screen mode
Alias Set System aliases
Unalias To cancel a system alias
Date View or set the system time
Clear Clear Screen
History View the History of command execution
Eject Eject Optical Drive
Time Calculate Command Execution time
nc Powerful networking tools
Xargs Convert standard input to command line arguments
Exec command to invoke and execute instructions
Export setting or displaying environment variables
unset Delete a variable or function
Type Used to determine if another command is a built-in command
Bc Calculator

System Management and performance monitoring commands (9)
Command Function description
Chkconfig Managing Linux System Boot entry
Vmstat Virtual Memory Statistics
Mpstat Displays status statistics for each available CPU
Iostat Statistical system IO
Sar Full access to system performance data such as CPU, run queue, disk I/O, paging (swap), memory, CPU interrupt, and network
IPCs Used to report the status of interprocess communication facilities in Linux, and the information displayed includes information about Message Queuing, shared memory, and semaphores.
Ipcrm Used to delete one or more message queues, semaphore sets, or shared memory identities
Strace For diagnosing and debugging Linux user space trackers. We use it to monitor the interaction between the user control process and the kernel, such as system calls, signal transmission, etc.
Itrace The command tracks the library function call of the process, which shows that the library function is called

Commands for shutting down, restarting, logging off, and viewing system information (6)
Command Function description
Shutdown Shutdown
Halt Shutdown
Poweroff Power off
Logout Exit the shell that is currently logged in
Exit Exit the shell that is currently logged in
Ctrl+d Exit the fast-build of the currently logged-in shell

Process Management Related commands (15)
Command Function description
Fg The command in the background is moved to the foreground to continue execution
Jobs See how many commands are currently executing in the background
Kill Terminating a process
Killall Terminating a process with a process name
Pkill Terminating a process with a process name
Crontab Timed Task commands
Ps To display a snapshot of a process
Pstree Tree Display Process
Nice/renice Prioritize program runs
Nohup command to ignore pending signal run instructions
Pgrep Find a process for matching criteria
RunLevel Find the current operating level of the system
Init Switching the Run level
Service Start, stop, restart, and shut down system services, and also display the current status of all system services
Bg A command paused in the background to continue execution (performed in the background)

Linux Common Commands Summary

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.