Linux basic commands

Source: Internet
Author: User
Tags create directory

Switch Machine command

Reboot, restart the system.

Poweroff, turn off the machine

Shutdown-h now, immediately shut down, the following can be replaced by time, you can specify the shutdown time instructions

Shutdown-r Now, like the previous one, is just Restart .

Sync, synchronize your hard drive data, and you should use it multiple times before restarting or shutting down the computer.  


Network SERVICE commands

Service Network restart Restart networking service

Ifup eth0 start eth0

IFCONFIG-A List all network configuration information

Ifconfig eth0 down Eth0

Ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up with IP address and gateway boot eth0


Permissions

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7C/F9/wKioL1bdkD3DG9WWAABrz-0tWfE637.png "title=" Picture 3.png "alt=" Wkiol1bdkd3dg9wwaabrz-0twfe637.png "/>


Absolute Path

Specify starting from the root directory

relative Path

Refer to the current directory where you specify

Window is . represents a layer, Linux is a .. represents a layer

There is a hint that the strike path between detection

~ Yes,home directory

Press tab to have [ commands and Directories ] full-complement function, two .


Directory commands

Ls-a All Files

LS-LH user-friendly detailed information

Ls-ld Detailed Directory Properties

Ll-a

... ls ll option like


Create Directory command

mkdir Bols

mkdir-p Janpan/cangls build the first non-existent directory and build a second command


Switch directories

CD ~ Current User home Directory

CD/root directory

CD-Last Catalog

Cd.. Top level Directory

RM Delete Directory

RM Delete File has confirmation

rm-r Deleting a directory
RM-RFforcingDelete directory habits, delete files or delete directories with this command
RM-RF/will delete the directory. Very dangerous command.
rm-rf test/Delete Test directory
RM-RF test/* Delete the contents of the test directory









This article from the "from the More" blog, reproduced please contact the author!

Linux basic commands

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.