Linux Foundation Command One (supplemental)

Source: Internet
Author: User
Tags aliases clear screen

Echo

Ls

Ls–l----LL

Pwd

CD/root directory

CD ~

CD-Back to previous directory

Env

IP Addr Display physical network address

/etc/init.d/network Restart boot nic displays "OK" for both successful

Then terminal input Ifup eht0

You can try ping www.baidu.com to see if you are connected to the extranet

Then use Xshell to link the virtual machine

Ssh Root @ip address –p (default port)

Common default ports:

Web (HTTP)/443 (HTTPS)

Ssh 22

Telnet 23

Redis 6379

MySQL 3306

FTP 21/20

Install the tree command: Yum–y install tree to view files in the structure of a graph

Cd

Relative path:

Cd.

Cd..

CD ~ Switch Home directory

cd–

Cd.. /

CD ~/foo_bar switch to Foo_bar directory

To view command aliases alias:

Alias:

Alias aliases = "Want to Alias"

To cancel an alias:

Unalias aliases

CD switch directly to the/root directory

Ls–a Show all files including hidden files

Ls–l Show file Detail properties

Ls–la Show all file detail properties including hidden files

Ls–help Seek order Help

Ll–rht the file information in reverse chronological order

Linux commands are case-sensitive

-One letter

--a single word

Options Sub-options

Ctrl + C terminates.

Ctrl + D exits.

Ctrl + A can switch to the front of the current command line

Ctrl + E To switch to the last face of the current command line

Ctrl + K to clear the command line after the cursor

Ctrl + u can clear the previous command line of the cursor

Ctrl + L Clear Screen

Vim/etc/sysconfig/network-scripts/ifcfg-eth0 modifying Onboot=yes

Cat!$ View last content parameter of previous command

!! View the content parameters of the previous command

!^ the first parameter of the previous command

Turn off and turn on the NIC: Ifdown eth0 && ifup eth0

Less # Display file contents by screen

Shortcut keys:

G: Wen Mei

GG: Wen Shou

Q Exit the View file

Space: Flip Screen

Help View:--help

More similar to less viewing file contents

Head: Read from the head of the file, displaying 10 rows by default

Head-n 20/etc/init.d/network | Wc–l View the number of rows you currently can view (n writable,-n 20 (-20))

Head file

Head–n Number of line files

head– Number of line files

Tail: Start reading from the end of the file

Parameter with Head

For i in ' seq ';d o echo "Hello Dplinux-$i" >> aa;sleep 1;done # # It's a little hard to understand

echo "Hello World" >> AA append Hello world to AA

Pipe: "|"

Change file name: MV Old filename New file people

Moving files: MV file name/path/

Move file and rename: MV filename/path/new file name

CP Replication

Alias

Placing the user misoperation, more convenient-I is to prevent accidental operation.

Man command:

Detailed command functions can be displayed:

Example: Man–ls

Linux Foundation Command One (supplemental)

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.