This article is taken from the Linux / Unix instruction example quick reference manual.
Last: last login, displays the logged in account
last, display the logged in account.
last -x, display system shutdown parameters and operation level.
Lastb: last bad login, which displays the account that failed to log in
lastb, display the account that failed to log in.
lastb -i, displays the IP address instead of the host name.
LDD: Library dependencies, which lists the function libraries related to files
ldd /bin/netstat, displays the shared function library used by / bin / netstat.
ldd /bin/cat, displays the shared function library used by / bin / cat.
Less: less to display the contents of the file
less ezhttp.log, page through the ezhttp.log file.
Use PgUp and PgDn to page up and down, and use Q to exit.
ps -ef | less, PS view the process information and display it in less pages.
Lilo: Linux loader, boot program
lilo -v -v -v, after setting the boot configuration of / etc / lilo.conf, make it effective at boot, and specify the display of the third level mode.
Ln: link to create a new connection between files
ln -s yy zz, the file YY generates a symbolic link ZZ.
ln yy xx, the file YY generates a hard link ZZ.
Lindir: link directory, new connection between directories
lndir /etc/vsftpd/, create a new directory connection.
Lnstat: Linux network statistics, which lists network data statistics.
lnstat -d, lists the supported statistics files.
Locate: locate to find a file containing a specific string in the system
locate mysql.sock, find the mysql.sock file in the whole system.
locate -n 100 a.out, look for a.out files in the whole system, but only 100 are displayed at most.
locate -u, create a database.
If the system cannot find the locate command, you need to install locate first,
yum install mlocateAnd then update the database of locate,
Logname: login name, which lists the login accounts
logname, display the account number that first logged in to the system.
Logrotate: log rotate, which compresses and backs up log files regularly or quantitatively
logrotate /etc/logrotate.conf, execute the logrotate command and adopt the settings in / etc / logrotate.conf.
Logsave: log save, save the output of the development program as a log file
logsave ps.txt ps, record the output of PS to the file ps.txt.
LP: line printer, print file
lp file1, enter file1 through the default printer.
LPQ: line printer queue, which lists the queues waiting for printers
lpq, lists the queue status of the current printer.
Lprm: line printer remove to delete the printing task
lprm -, cancel all print jobs.
Ls: list, listing directories or file names
ls -ltr s*, list all files whose names start with s in the current working directory, followed by the new one.
ls -lR /home, list all directories and file details below the / home directory.
ls -AF, list all files and directories under the current working directory. The directory name will be followed by “/”, the executable name will be followed by “*”, and the linked file will be followed by “@”.
Lsattr: list attribute, which lists the attributes of files in ext2 or ext3 systems
lsattr, lists the categories of the current file.
Lsmod: list module, which lists the usage status of kernel modules
lsmod, list the usage status of (some) kernel modules on RedHat and fedora.
Lsusb: List USB, list all USB devices.
lsusb, list the current USB devices.
Lynx: it is named from the university laboratory, and the web page content is displayed on the text interface
lynx www.google.com, browse the web page on the terminal through lynx command.
Mail: mail, send and receive mail
mail -s "test mail" [email protected], the subject of the letter is “test mail”, and then right-click the content. At the end of the letter, enter a point and press enter. Then enter the sender’s email address and press enter without.
If there is no mail command, you need to install mailx first,
yum install mailx。
Mailstatus: mail status, which displays the current mail status
mailstats, list the current mail statistics.
Mailq: mail queue, which lists the messages in the queue
mailq, lists all messages in the queue that have not yet been sent.
Make: make GCC program, maintenance or compiler group
make -C /etc/mail, compile the sendmail configuration file under redhad.
cd /usr/src/linux make make modules_install make install
The compilation order in which the kernel is run.
Makemap: make map files to generate sendmail database files
makemap -l, lists the supported conversion file types.
makemap hash /etc/mail/access.db < /etc/mail/access, generate the / etc / mail / access.db conversion file through / etc / mail / access.
Man: manual to display online help information
man kill, displays a description of the kill command.
man -K kill, displays all kill related instructions.
Manual path: manual path, which displays the search path of online help
manpath, displays the search path for the online help.
Md5sum: MD5 check sum to calculate and display MD5 sum.
md5sum file1, verify MD5 sum of file file1.
md5sum -c check.txt, check whether the MD5 sum recorded in check.txt is correct.
MESG: message, which controls the write permission of the terminal
mesg, view other people’s write permissions to the current terminal.
mesg n, turn off other people’s write permission to the current terminal.
Mkbootdisk: make boot disk to create a boot disk
mkbootdisk --device /dev/fd0 --verbose 2.6.33, use the kernel of 2.6.33 to make the boot disk.
MKDIR: make directory to create a new directory
mkdir temp, create a new temp subdirectory under the current directory.
mkdir -p /opt/www/test, create all nonexistent directories and upper level directories.
Mke2fs: make ext2 / ext3 file system, a file system formatted as ext2, ext3, or ext4
mke2fs /dev/sda3, format the partition as an EXT2 file system.
mke2fs -j /dev/sda3, format the partition as an ext3 file system.
mke2fs -t ext4 /dev/sda3, format the partition as an ext4 file system.
Mkfs: make file system, format file system
mkfs /dev/sda1, format the partition / dev / sda1 as the default EXT2 file system.
Mkfs.xfs: make XFS file system, file system formatted as XFS
mkfs.xfs /dev/sdc3, format the partition as an XFS file system.
Mkinitrd: make initial ramdisk images to create an image file of ramdisk
uname -a, create a mirror file.
mkinitrd /boot/initrd-new.img 2.6.33-85.fc13.i686.PAE, create a mirror file.
Mkreiserfs: make Reiser file system, the file system formatted as ReiserFS
mkreiserfs /dev/sda1, format the partition / dev / sda1 as the file system of ReiserFS.
Mkswap: make swap to create a new swap space
mkswap /dev/sda2, create a new swap space.
Modinfo: module information, which displays the information of the kernel module
modinfo mii, displays the MII module information.
modinfo -a snd, only the author information of the snd module is displayed.
Modeprobe: module probe, which creates or deletes a module from the kernel
modprobe -l ext*, displays the module name whose name starts with ext.
modprobe --show-depends ext2, displays the module names related to ext2.
More: more to display the contents of the file
more -s testfile, the file contents of testfile are displayed page by page. If there are more than two consecutive blank lines, one blank line will be displayed.
more +20 testfile, display the contents of the testfile file from line 20.
Mount: mount, mount the file system
mount, displays the current partition status.
mount -t xfs /dev/sda2 /opt, mount the partition / dev / sda2 on / opt and specify the file system as XFS.
mount -t ext3 server1://data /opt, mount the file system shared by the NFS server.
mount -t smbfs -o username=tom,password=123 //10.1.1.1/TL /tmp, mount the file system shared in the network neighborhood of windows system.
Mtools: MSDOS tools, which displays commands supported by mtools
mtools, displays all commands that support the MSDOS file system.
Mutt: mail user agent, mail tool with text interface
MV: move to move or rename a file or directory
mv aaa bbb, rename the file AAA to BBB.
mv *.c finished, move all. C files to the finished directory.
Nano: nano’s other editor
NcFTP: new command line FTP, transmitting and receiving files
# ncftp -u max -p abc123 172.20.11.1 > get readme > bye > yes
Use the NcFTP command to download a readme file.
Netstat: Net status to query the current status of the network
netstat -nt, displays the current TCP connection status.
netstat -aptDisplays the port number currently used by the TCP application process.
Nice: nice, change priority
nice nice -n 1 /bin/bash nice
Adjust the priority of the shell.
Nohup: no HUP, running the specified program in the background
nohup script1 &, script1 runs in the background and can continue to run after going offline.
NSLOOKUP: name server lookup, the correspondence between domain name and IP address
# nslookup > www.163.com > exit
Check the website address of www.163.com.
# nslookup > set type=mx > qq.com
Query the address of qq.com mail server.
Od: octal dump, output the file contents in octal encoding
od file, output the file contents in octal encoding.
od -t c file, the contents of the file are displayed in asccii code.
Passwd: password, modify password
passwdFor general account, change the password.
passwd mark, modify the password of the account mark.
passwd -l peter, deactivate the Peter account.
passwd -u peter, enable the Peter account.
Paste: paste, merge the contents of the file
paste file1 file2, merge the two files in columns.
Patch: patch, patch update
patch file file.patch, patch the file file with the patch file file.patch.
patch b file file.patch, patch the file file with the patch file.patch, and back up the original file.
PG: pagewise to display the contents of the file
pg aaa, use PG to display AAA file.
Pgrep: process grep, which displays the process according to the PID
pgrep gdm, lists the PIDs related to the string GDM.
Pico: pin composer, text editing
Pidof: process ID of something to find the PID of the process
pidof nfs, displays the PID used by the process NFS.
Pin: author naming, text interface mail tool
In the new version of Linux, pine has been replaced by alpine.
Ping: ping pong collision sound. Test whether the host is online with a specific packet
ping -c 5 www.sina.com.cn, send 5 ICMP echo packets and display the statistical results.
ping -s 120 192.168.1.1, test with a packet size of 120byte.
ping -r www.sina.com.cn, data packets are transmitted directly without going through the gateway.
Pkill: process kill, which sends a signal to the specified process
pkill -9 sendmail, terminate the running process containing sendmail.
PMAP: process map, which displays the memory map of the process
pmap 2245, the running status of process 2245 is displayed.
Postalias: postfix aliases, which generates the aliases database file of postfix
Postmap: postfix map, which generates the access database file of postfix
Postqueue: postfix queue, control command of postfix queue area
mailq, displays the messages in the mailq queue.
postqueue -f, force the delivery of messages in the queue.
Postsuper: postfix super, advanced management of postfix mail queue
postsuper -d B175, delete message b175.
postsuper -d ALL, delete all e-mails in the queue.
PR: print, rearrangement before printing
PS: process, which displays the current process
psTo display the processes running under the current account.
ps -ef, complete the process of listing all accounts.
ps aux, list the processes of all accounts, as well as all cups and memory ratios of the process.
Pstree: process tree, which represents the current process in a tree
pstree, which represents the current process running status in a tree.
Pwck: passwod check to check the correctness of the password file
Pwconv: password convert, convert to projection password
PWD: print the working directory to display the current directory
pwd, displays the current directory.
Pwunconv: password convert, restore projection password
Quota: quota, which displays and limits the amount of hard disk used by the account
quota, display your hard disk usage.
quota mark, display the hard disk usage of account mark.
Quotacheck: quotacheck to check the limit of hard disk space of the account
Quota off: quota off, turn off the limit of hard disk space of the account
Quota on: quota on, open the limit of hard disk space of the account
Quotastats: quota status, which displays the statistics of the account’s hard disk space limit