Home > OS >  Commonly used Linux command
Commonly used Linux command

Time:09-28

Linux is a free to use and the spread of free unix-like operating systems, based on POSIX and Unix is a multiuser, multitasking, and support multithreading and multiple CPU operating system, it can run Unix tools software, main applications and network protocol, which supports both 32-bit and 64 - bit hardware, Linux inherited the Unix network as the core of the design idea, is a stable performance of multi-user network operating system,



Linux command is the command to Linux system management, for Linux system, whether the CPU, memory, disk drives, keyboard, mouse, or user files, such as Linux system administration commands is the core of its normal operation, similar to the DOS command before, Linux command in the system there are two types: internal Shell commands and Linux command,


The command

Function description

Online query and help command (2)

Man

Check command assistance, command dictionary, more complex and info, but not commonly used,

Help

View your Linux built-in command help, such as CD,

File and directory operations command (18)

Ls

Whole put together a list of functions is listed directory attribute information and its content, the content of the

CD

Whole put together change directory, the function switch from the current working directory to the specified working directory,

Cp

Whole put together the copy, and its function to copy a file or directory,

The find

Find the meaning of, to find directories and files in the directory,

The mkdir

Whole put together make directories, its function is to create the directory,

The mv

Whole put together a move, its function is to move or rename files,

The PWD

Whole put together a print working directory, its function is to display the current working directory of the absolute path,

Rename

Used to rename files,

The rm

Whole put together the remove, its function is to remove one or more files or directories,

Rmdir

Whole put together the remove empty directories, the function is to remove empty directory,

Touch

Create a new empty file, change the existing file timestamp attribute,

Tree

Function is based on tree structure according to the contents of the directory,

The basename

Display the file name or directory name,

Dirname

According to a file or directory path,

Chattr

Change the file extension attributes,

Lsattr

Check the file extension attributes,

The file

Shows the type of file

Md5sum

Calculation and check file MD5 value,

Check the file and content processing command (21)

The cat

Whole put together concatenate, the function is used to connect multiple files and print to screen lose

Out or redirect to the specified file,

Tac

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

More

Paging display file content,

Less

Paging display file content, instead of more commands usage,

The head

Shows the head of the file content,

Tail

According to the end of the file content,

The cut

The files of each line according to the specified delimiter segmentation and output,

The split

Split files into different pieces,

Paste

According to the merger to the file content,

Sort

The content of the text for file sorting,

Uniq

Remove duplicate rows, oldboy

Wc

Statistical file number of rows, number of words or bytes,

Iconv

Convert file encoding format,

Dos2unix

Convert DOS format file into UNIX format,

The diff

Whole put together difference, comparing the difference between the file, commonly used in text files,

Vimdiff

Command line visualization file comparison tool, often used for text files,

Rev

Reverse the output file content,

The grep/egrep

Filter string, the three musketeers, Lao,

The join

According to the two files in the same field to merge,

Tr

Replace or delete characters,

Vi/vim

Command line text editor,

Command file compression and decompression (4)

The tar

Packing compression, oldboy

Unzip

Unzip the files,

Gzip

Gzip compression tools,

Zip

Compression tools,

Information display command (11)

Uname

According to the operating system information command,

The hostname

Displays or sets the current system of the host name,

Dmesg

According to boot information, used in fault diagnosis system,

Uptime

Display system running time and load,

The stat

Display files or the state of the file system,

Du

Disk space usage,

Df

Report file system disk space usage,

Top

Real-time display system resource usage,

Free

Check the system memory,

The date

Displays and sets the system time,

CAL

View the calendar information such as time,

Search for files command (4)

Which

For binary command, according to the PATH environment variable PATH search,

The find

From the disk traversal search files or directories,

Whereis

For binary command, according to the PATH environment variable PATH search,

Locate the

From the database (/var/lib/mlocate/mlocate db) find command, and use updatedb update library,

User management command (10)

Useradd

Add user,

Usermod

Modify system existing user attributes,

Userdel

Delete users,

Groupadd

Add user groups,

Passwd

Modify the user password.

Chage

Modify the user password expiry date,

Id

Check the user's uid, gid and attribution of user groups,

Su

Switch the user identity,

Visudo

Edit/etc/sudoers file exclusive command,

Sudo

To another user identity (default root) allows command in sudoers file beforehand,

Basic network operation command (11)

Telnet

Using the TELNET protocol remote login,

SSH

Use SSH cryptographic protocol remote login,

SCP

Whole put together secure copy to copy files between different host,

Wget

Command line download file,

Ping

Test network connectivity between hosts,

The route

Display and set the routing tables of Linux system,

The ifconfig

View, configuration, enable or disable the network interface command,

Ifup

Start the adapter,

Ifdown

Close the network card,

Netstat

Check the network status,

Ss

Check the network status,

In-depth network operation command (9)

Nmap

Network scanning order,

The lsof

Full name list open files, which is listed in the system has been open file,

Mail

Send and receive mail,

Mutt

E-mail management command,

Nslookup

Interactive query Internet DNS server command,

Dig

Find a DNS lookup process,

The host

Query DNS command,

Traceroute

Tracking data transmission route condition,

Tcpdump

The command line caught tools,

Command of disk and file system (16)

The mount

Mount the file system,

Umount

Unmount the filesystem,

FSCK

Check and repair the Linux file system,

Dd

Conversion or copying files,

Dumpe2fs

Export however/ext3/corruption file system information,

Dump

However/3/4 file system backup tool,

Fdisk

Disk partition command, suitable for below 2 TB disk partitions,

Parted
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull