Summary of commands common to Linux

Source: Internet
Author: User

Summary of commands common to Linux

According to the bird Brother Linux private dishes defined: must first learn the instructions:ls, more, cd, pwd, rpm, ifconfig, Find

Login and Logout (aircraft and aircraft):telnet,Login,Exit,Shoudown,reboot
Linux Multi-person multi-work and background function:& [Ctrl]+[z],FG,PS,Kill
Archives and Records management:CD,pwd,ls,Cat, More,mkdir,RM,rmdir,MV,CP,LN,Find,Whereis,chmod,Chown,chgrp,DF,du
disk and hard management :Mount, fdformat, fdisk, mke2fs, mkbootdisk, Badblocks, fsck, rpm
Systems Management:su,Clear,DMESG,Groupadd,Useradd,userconf,passwd,W.H.O.,WhoAmI,Top, Free,Quotacheck,Edquota
compression directive :compress, gzip, tar
Some network features :ifconfig, Route, netstat, hostname, ping, Nslookup,talk, traceroute, Mail
Others are not:date, cal, grep
FTP instruction :ftp, ncftp, gftp
Setting Directives :set, uname, setup, lilo, xconfigurator, Xf86config
x-window directive :startx, netconf, netcfg, xf86setup

Let's follow the above modules to introduce the commands separately:

First, login and logout

Telnet

This software exists in both Windows and Linux systems, except that the interface is a bit different. Basically, this program is used by the user to log in to the remote host terminal. For example, the birds are in Tainan, but I can use the Internet-connected computer in Tainan, which is set by Telnet to the Linux host on the home! Feel like playing your own Linux host at home! in general, if you are using the Winodows system, you can enter Telnet xxx.yyy.zzz.qqq after "Start" and "execute", where XXX.YYY.ZZZ.QQQ is an IP address that can be connected to the host (or is BBS) hello. Of course, if you are in a Linux system, you can also directly input Telnet xxx.yyy.zzz.qqq to connect to the host or BBS! language: telnet host address (or host name)

Login

The
command to log in to the system will be self-executed when the remote enters the system. Assume that the system master you want to log into is sun.os.test.com, and you can do it on the Telnet software or other software under Windows: telnet sun.os.test.com

Exit

This is the command to leave the Linux system, as is the meaning of login out.

Shutdown

Linux with the instructions of the machine, this command only Root has the power! The usage of shutdown is as follows:
shutdown-h now//system immediately boot
Shutdown-r now//system reboot immediately
shutdown-h 8:30//The system is on time to boot at this time (note: 24h system)
shutdown-h +10//system will boot up after 10min

Reboot

This is the command (or machine) that is most commonly used by birds to restart, and can be combined with the sync instructions that are written into the buffer
Sync, Sync, sync,
reboot

Second, multi-person and multi-work and background execution function

& and [Ctrl]+[z]

as mentioned earlier, background performs a lot of things at the same time as you do in the same terminal interface (Command mode), and you can use & or [ctrl]+[z] to perform the command placement in the background. For example, execute find "/"-name httpd & This line of command, indicating that the instructions to find httpd This file are placed in the background to perform the meaning. In addition, when you perform a program that takes a long time, such as when you perform an FTP program, you can also place the program in the background by pressing [ctrl]+[z].

Fg

FG is an instruction that calls the program back to the screen and outputs FG in the terminal mode. Of course, if you do not have a program to perform at the time, the system will tell you that you do not have a program (no such job).

Ps-aux

This is a command that looks at the program in the-aux, and you can do it with its parameters, as follows:
Ps-aux//Can view the program's user PID vsz time what

Kill

This is used to kill the program in the Execute command, you need to cooperate with the PS command, when you execute an FTP program, but he is a bit, you can ps-aux This command to find out the FTP code (PID) of this program, assume its PID is 110 , and then enter
Kill
110//You could have killed 110 of this process.

III. Archives and Target management

CD

This is the instruction used to change the working path. After logging in to the Linux system, root will be under/root, as the user will be under the/home/username of the preset, such as the bird's ID as Vbird, which will go to/home/vbird when logged in as Vbird. Ok! That goes back to the previous layer can be used CD. and to the opposite path can be to CD. /bird, to the absolute path is Cd/usr/sbin! ★ This directive is particularly important ....
CD.. Back to the previous level
# CD//transform for user's directory
cd/home/projects//Go to/home/projects under this directory

Pwd

This is an indication of the current record, for example, in the last record of the previous form is the/usr/bin, but the prompt character is only shown in bin, if you want to know the current record, you can enter the PWD:
pwd//can find the current directory

Ls

This is used to show the file name and content of the instructions, the file's content has been said to have been here, it is not repeated here! ★ This directive is particularly important ... The English method of LS is:
ls--color//color to display the document data
ls-l//detailing the structure of the system
ls-a//Show hidden documents
ls-al//List all content
Ls-al | more//Show all content by page

Cat

This is the instructions listed in the file. For example, under/root, there is a file named. BASHRC (This is the system's default file, which is a hidden file), and this directive is particularly important. You can press the CD back to the/root and execute it.
Cat. BASHRC//Can list the contents of the. BASHRC document.

More

do you think that when cat is reading a larger file, there will be no visible information (if the file is too big), then you can use more to read the page! In addition, more can be combined with other programs, such as LS! (In the following table, "|" is a separator, you can put two instructions together to perform!) )
★ Can read large documents
More
. BASHRC//You can list the contents of the. BASHRC document.

Mkdir

Create a new catalogue! For example, if we want to create a test catalog, you can do the following:
mkdir Test//Create a new directory named Test

Rm-irf

This is the removal instruction, which is the del instruction under DOS! It is important to note that, usually in the Linux system, in order to be afraid of the file is to be misunderstood, so have already had the-I this,-I refers to each file is confirmed before the murder. And if you want to kill the Yi together, you need to use-RF.
RM Test//Delete this folder
RM-RF Test//With files under folder removed

RmDir

mkdir is the establishment of a record, and rmdir is the removal of the order of the catalogue. But if there is a file or other item in the catalog that you want to remove, you can't remove it, and you'll have to remove it with just RM-RF!

Summary of commands common to Linux

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.