Fast query of Linux commands

Source: Internet
Author: User

Fast query of Linux commands
Monday, 2. January 2006, 09:28:48

FreeBSD, Linux, Shell

1. Start, shut down, log on, and log out commands
<Login> log on
<Logout> log out
<Exit> logout
<Shutdown> stop the system
<Halt> stop the system
<Reboot> restart
<Poweroff> power off
<Sync> write the content in the memory to the disk
<Lilo> install lilo to start the hypervisor.
<Grub> install lilo to start the hypervisor.

2. shell commands
<CHSH> switch Shell
<History> display command resume
<Alias> set command alias
<Unalias> cancel command alias
<Which> display the command location
<Type> query command types
<Echo> display string or variable content
<Set> set/Display Shell Variables
<Printenv> display environment variables
<Export> set Environment Variables
<Env> set temporary environment variables
<Unset> release Environment Variables
<Setenv> set Environment Variables
<Unsetenv> release Environment Variables
<Source> commands in the execution File
<Man> query command Manual
<Info> query hypertext command Manual
<Whatis> display command Introduction
<Apropos> keyword query manual

3. User management commands
<Su> switch to another user
<Useradd> append user
<Adduser> append user
<Userdel> delete a user
<Usermod> modify user settings
<Chfn> modify user private information
<Groupadd> append Group
<Groupdel> delete a group
<Groupmod> modify group settings
<Passwd> Change Password
<Whoami> Display User Name
<LOGNAME> the logon user account is displayed.
<Users> display information of all logon users
<Who> query logon user information
<W> query logon user information
<ID> display the ID of a specified user
<Groups> displays the group to which the specified user belongs.
<Finger> displays the personal information of a specified user.
<Mesg> switch to send and receive messages from others
<Write> send messages to other users
<Wall> send messages to all users
<Talk> chat with other users

4. system message-related commands
<Date> display/set the current time
<Uptime> displays the system running time.
<Arch> display the machine's core architecture (for example, i386)
<Uname> display operating system information
<Tty> display terminal name
<Last> display logon/logout in resume
<Lastb> illegal logon information is displayed.
<Dumpkeys> displays the current keyboard Configuration
<Loadkeys> modify keyboard Configuration
<DF> query disk usage information
<Du> query disk usage information
<Dmesg> displays the system startup message.
<SCRIPT> Save input and output to a file

V. File Operation commands
<Ls> display the file list
<Tree> display directory tree
<PWD> display current path
<Cd> change the current path
<Pushd> append path to directory Stack
<Popd> delete a path from the directory Stack
<Dirs> displays the contents of the Directory stack.
<Mkdir> create a path
<Rmdir> Delete path
<CP> copy a file/directory
<Rm> delete a file/directory
<Mv> move the file/directory and modify the file name.
<Chown> change the owner of the file/directory
<Chgrp> modify all groups of files/Directories
<Chmod> Modify file/directory permissions
<Touch> change file time
<Ln> create a file/directory Link
<Find> Search for files
<Whereis> display the path name of the file
<File> Query file types
<Size> Query file size

6. File editing commands
<Cat> display file content
<Tee> output to files and screens
<More> split-screen display of File Content
<Less> split-screen display of File Content
<Head> display file header content
<Tail> display the content at the end of the file
<Fold> fold and show long lines
<Sort> arrange the row of a file
<CMP> Compare file content
<Diff> display file differences
<NKF> change the Japanese file encoding
<DD> copy the modified File
<WC> count text words and file size
<Split> split files
<Paste> connect a file in a row
<Join> connect files with Fields
<Grep> query text
<Uniq> filter duplicate parts to display file content
<Tr> Replace text
<Sed> Replace text

VII. Compression/Decompression commands
<Ar> compressed/decompressed files
<Tar> compressed/decompressed files
<Compress> compressed/decompressed files
<Uncompress> extract
<Gzip> compressed/decompressed files
<Gunzip> extract
<Zcat> display compressed file content
<LHA> compressed/decompressed files
<Uuencode> encodes a binary file into a text file.
<Uudecode> restores the encoded text file to a binary file.

8. MS-DOS toolset [mtools] command
<Mdir> display the file list
<MCD> change the current directory
<MMD> create a directory
<MRD> delete a directory
<Mdeltree> delete a directory tree
<Mcopy> copy an object
<Mdel> delete an object
<Mmove> move a file
<Mren> change the file or directory name
<Mattrib> Modify file attributes
<Mtype> display file content
<Mdu> query the file or directory size
<Minfo> display disk Information
<Mformat> Format the disk as a MS-DOS
<Mlabel> set disk labels

9. commands for controlling external devices
<Mount> mount the device
<Umount> remove the mounted device
<Eject> pop-up (CD/DVD, etc)
<Fdformat> Format a floppy disk
<Fdisk> Configure/display Hard Disk Partitions
<Mkfs> Format Disk Partitions
<Fsck> check/fix disk errors
<LPR> Print to printer
<Lprm> interrupt the print task
<Lpq> display the status of the print task
<LPC> Manage/control print tasks
<Ifconfig> display/set Nic Configuration

10. Process and task management commands
<PS> displays running processes.
<Jobs> displays Tasks running in the background.
<FG> switch the task to the foreground
<Bg> switch the task to the background
<Kill> stop a process or task
<Killall> abort a process or task
<Wait> wait until the process or task ends.
<At> set scheduled task execution
<ATQ> displays unexecuted tasks.
<Atrm> delete a scheduled task
<Batch> execute the task when the system load is reduced
<Nice> change priority and execute tasks
<Nohup> execute tasks in the background and do not exit after logout.
<Sleep> sleep for a certain period of time

11. network management commands
<Netstat> displays the current network connection status.
<Route> display/set routes
<Host> displays network host information
<Hostname> display/set the name of the current host
<Ping> confirm the connection with the remote machine.
<Traceroute> display route information
<Rwho> query login users of online machines
<Ruptime> query the system running time of online machines
<Rlogin> log on to a remote machine
<Telnet> use Telnet to log on to a remote machine.
<RSH> send commands to remote machines
<RCP> copy files between remote machines
<Mail> receive emails
<Sendmail> send email
<Mailq> confirm the mail queue
<Ftp> use ftp to transfer files

11. Other commands
<Cal> display calendar
<Clear> clear screen
<GCC> compile C code
<As> assembly
<BC> computing
<RPM> RedHat package management
<Dpkg> Debian package management
<Installpkg> install the slackware package (the DELETE command is removepkg)
<Xf86setup, turboxfg, xconfigurator> Configure the X server
<Startx> Start the X-Window System

Appendix: Combined commands
Redirection, such
$ LS-L/bin> ls-Output
$ More ls-Output

Pipeline commands, such
$ Cat file1 file2 | sort | uniq

Commands frequently used in pipelines
Awk, fold, grep, Head, nnkf, PR, sed, sort, tail, Tee, TR, uniq, WC

Reprinted from: http://my.opera.com/jlake/blog/show.dml/100472

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.