Common commands for Linux enterprises and Common commands for linux Enterprises

Source: Internet
Author: User
Tags secure copy

Common commands for Linux enterprises and Common commands for linux Enterprises

Common Linux Enterprise commands

Command

Function Description

Online query and help commands (2)

Man

View Command help, command dictionary, more complex info, but not commonly used.

Help

View the help of Linux built-in commands, such as the cd command.

File and directory operation commands (18)

Ls

The full list function is to list the contents of a directory and its content attributes.

Cd

The change directory function is to switch from the current working directory to the specified working directory.

Cp

The full copy function is to copy files or directories.

Find

It is used to find the Directory and files in the directory.

Mkdir

Make directories. Its function is to create a directory.

Mv

The function of moving all files is to move or rename files.

Pwd

Print working directory, which is used to display the absolute path of the current working directory.

Rename

Used to rename a file.

Rm

Remove all files or directories.

Rmdir

Remove empty directories to delete empty directories.

Touch

Create a new empty file and change the timestamp attribute of the existing file.

Tree

The function is to display contents in a directory in a tree structure.

Basename

Displays the file name or directory name.

Dirname

Displays the file or directory path.

Chattr

Change the extension attributes of a file.

Lsattr

View the file extension attributes.

File

The type of the displayed file.

Md5sum

Calculate and verify the MD5 value of the file.

View File and content processing commands (21)

Cat

Concatenate is used to connect multiple files and print them to the screen output or redirect them to the specified file.

Tac

Tac is the reverse spelling of cat, so the command function is to reverse display the file content.

More

The file content is displayed by page.

Less

The file content is displayed by page. The more command is used in reverse mode.

Head

Displays the File Content Header.

Tail

The end of the file.

Cut

Splits and outputs each line of the file according to the specified delimiter.

Split

Split the file into different small fragments.

Paste

Merge file content by line.

Sort

Sorts the text content of a file.

Uniq

Remove duplicate rows. Oldboy

Wc

Count the number of lines, words, or bytes of the file.

Iconv

The encoding format of the converted file.

Dos2unix

Converts a DOS file to a UNIX file.

Diff

Difference is used to compare differences between files.

Vimdiff

Command Line visual file comparison tool, commonly used in text files.

Rev

Reverse output file content.

Grep/egrep

Filter string.

Join

Merge by the same fields of the two files.

Tr

Replace or delete characters.

Vi/vim

Command Line Text Editor.

File compression and decompression commands (4)

Tar

Package and compress. Oldboy

Unzip

Decompress the file.

Gzip

Gzip compression tool.

Zip

Compression tool.

Information Display command (11)

Uname

Command Used to display information about the operating system.

Hostname

Displays or sets the Host Name of the current system.

Dmesg

Displays the boot information to diagnose system faults.

Uptime

Displays the system running time and load.

Stat

Displays the status of a file or file system.

Du

Calculate disk space usage.

Df

Reports disk space usage of the file system.

Top

Displays system resource usage in real time.

Free

View the system memory.

Date

Display and set the system time.

Cal

View calendar and other time information.

Search file commands (4)

Which

Find binary commands and search by PATH of the environment variable.

Find

Search for files or directories through disk traversal.

Whereis

Find binary commands and search by PATH of the environment variable.

Locate

Run the/var/lib/mlocate. db command to update the database.

User management command (10) Old Boy

Useradd

Add a user.

Usermod

Modify existing user attributes of the system.

Userdel

Delete a user.

Groupadd

Add user groups.

Passwd

Change the user password.

Chage

Change the validity period of the user password.

Id

View the uid, gid, and user group of the user.

Su

Switch user identity.

Mongodo

Edit exclusive commands for the/etc/sudoers file.

Sudo

Execute commands allowed in the sudoers file as another user (Default root User.

Basic network operation commands (11) Old Boy

Telnet

Use TELNET to log on remotely.

Ssh

Use SSH encryption protocol for remote logon.

Scp

Complete secure copy, used to copy files between different hosts.

Wget

Download the file through the command line.

Ping

Test the network connectivity between hosts.

Route

Displays and sets the route table of a linux system.

Ifconfig

Command for viewing, configuring, enabling, or disabling network interfaces.

Ifup

Start the NIC.

Ifdown

Disable the NIC.

Netstat

View the network status.

Ss

View the network status.

In-depth network operation commands (9)

Nmap

Network scan command.

Lsof

Full name list open files, that is, list files already opened in the system.

Mail

Send and receive emails.

Mutt

Mail management commands.

Nslookup

Interactive Query of Internet DNS commands.

Dig

Find the DNS resolution process.

Host

Query DNS commands.

Traceroute

Tracks the Route status of data transmission.

Tcpdump

Command Line packet capture tool.

Commands for disks and file systems (16)

Mount

Mount the file system.

Umount

Uninstall the file system.

Fsck

Check and fix the Linux File System.

Dd

Convert or copy files.

Dumpe2fs

Export ext2/ext3/ext4 file system information.

Dump

Ext2/3/4 file system backup tool.

Fdisk

Disk Partition command, applicable to disk partitions under 2 TB.

Parted

The disk partition command does not limit the disk size. It is usually used for disks smaller than 2 TB.

Mkfs

Format and create a Linux File System.

Partprobe

Update the information of the hard disk partition table of the kernel.

E2fsck

Check the ext2/ext3/ext4 file system.

Mkswap

Create a Linux swap partition.

Swapon

Enable swap partition.

Swapoff

Disable swap partition.

Sync

Write Data in the memory buffer to the disk.

Resize2fs

Adjust the size of the ext2/ext3/ext4 file system.

System permissions and user authorization commands (4)

Chmod

Change the file or directory permissions.

Chown

Changes the owner and group of files or directories.

Chgrp

Change the file user group.

Umask

Display or set the permission mask.

Command for viewing system user login information (7)

Whoami

A valid user name is displayed, which is equivalent to executing the id-un Command.

Who

Displays the user information of the current logon system.

W

Displays the list of users that have logged on to the system and the commands that the user is executing.

Last

Displays the users logged on to the system.

Lastlog

Displays the last logon information of all users in the system.

Users

Displays the list of all users currently logged on to the system.

Finger

Search for and display user information.

Built-in commands and others (19)

Echo

Print the variable or directly output the specified string

Printf

Format the result and output it to the standard output.

Rpm

Command for managing rpm packages.

Yum

Automate and simplify the command for managing rpm packages.

Watch

Periodically execute the given command and display the command output in full screen mode.

Alias

Set the system alias.

Unalias

Cancels the system alias.

Date

View or set the system time.

Clear

Clear the screen.

History

View the command execution history.

Eject

The optical drive is displayed.

Time

Calculates the command execution time.

Nc

Powerful network tools.

Xargs

Converts a standard input to a command line parameter.

Exec

The command that calls and executes commands.

Export

Set or display environment variables.

Unset

Delete a variable or function.

Type

Used to determine whether another command is a built-in command.

Bc

Command Line scientific calculator

System management and performance monitoring commands (9)

Chkconfig

Manage Linux boot items.

Vmstat

Virtual Memory statistics.

Mpstat

Displays the status statistics of each available CPU.

Iostat

Statistics System IO.

Sar

Obtain performance data of the system, including CPU, Operation queue, disk I/O, paging (SWAP zone), memory, CPU interruption, and network.

Ipcs

Used to report the status of inter-process communication facilities in Linux. The displayed information includes the message list, shared memory, and semaphore information.

Ipcrm

Deletes one or more message queues, semaphore sets, or shared memory IDs.

Strace

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.

Ltrace

The command will trace the library function call of the process, and it will show which library function is called.

Command for shutdown/restart/logout and Viewing System Information (6)

Shutdown

Shut down.

Halt

Shut down.

Poweroff

Power off.

Logout

Exit the Shell that is currently logged on.

Exit

Exit the Shell that is currently logged on.

Ctrl + d

The shortcut for exiting the currently logged-on Shell.

Process Management commands (15)

Bg

Change a command that is paused in the background to continue (executed in the background ).

Fg

Move the commands in the background to the foreground to continue running.

Jobs

View the number of commands currently running in the background.

Kill

Terminate the process.

Killall

Terminate a process by process name.

Pkill

Terminate a process by process name.

Crontab

Scheduled Task Command.

Ps

Displays the process snapshot.

Pstree

Process is displayed in a tree.

Nice/renice

Adjust the program running priority.

Nohup

Ignore the pending signal and run the specified command.

Pgrep

Find the matching process.

Runlevel

View the current running level of the system.

Init

Switch the running level.

Service

Starting, stopping, restarting, and disabling system services also display the current status of all system services.


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.