Linux CentOS Learning Note--01

Source: Internet
Author: User
Tags clear screen

The company now requires learning Linux, and now just learned a few simple commands, will go to the 51CTO to see, the book is not to see in.

Here are the study notes:

1, Clear Screen command

Clear

Reset is all the content on the screen is erased

Alias set name alias Cl= ' Clear ' directly with CL

2, Switch User

Su root and enter the password

3, set the system host name

Hostname Host Name

Hostname Display host name

4, shutdown, restart, logoff

Shutdown Init 0 shutdown-h now

Restart init 6 Shutdown-r now reboot

Logoff logout (to be in command mode)

5,ls to display files and subdirectories within a folder

Ls

LS-A display. The file that begins with

Ls-s Show all the space for each file

6,CD Switching directories

Cd..

CD/

CD ~

Cd

Cd/usr/bin

7.mkdir Creating a Directory

mkdir Tool

8,rmdir Deleting a directory

RmDir tool

9.CP Copy command

CP data1.txt data2.txt copy Data1.txt to Data2.txt

CP data.txt/tmp/data Copy the data.txt to the/tmp/data directory

-V To display the command execution process

-r copy to all files and directories in directory

10,RM command to delete a file or directory

RM myfile

RM *

RM Myfile-f will delete files directly, no longer ask, force delete

RM myfile2-r deletes files and directories directly from the directory and the system no longer asks

Rm-rf myfile

Rm-v myfile Show Removal process

11,cat Command Connection File

Cat Data.txt More page to display data content

DAT data.txt >> data1.txt append data.txt file contents to the contents of the Data1.txt file

Cat data.txt data1.txt >new.txt data.txt data1.txt synthesis new.txt file

12,MV moving or replacing files, directory names

MV A.txt.

MV Z.txt Y.txt renamed Z.txt to Y.txt

MV Backup.

13,PWD Display the current directory

Pwd

Pwd-p Show actual path instead of using link path


This article from "Little Tiger" blog, declined reprint!

Linux CentOS Learning Note--01

Related Article

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.