Linux basic commands

Source: Internet
Author: User

mkdir xxx Create a folder named XXX

LS View list of file names in the same directory

ll see the details of the list of files in your directory

CD XXX To switch directories to a directory with the file name xxx

PWD Displays the current directory

Cd.. Back to the previous level of the current directory

RM-RF xxx Delete folder named xxx

VI a.js or VIM a.js new file, also use this command to view the content. Press ENTER after you click I can edit the content Esc exit Edit state Save and exit click ESC and enter: w for Save, enter : Q for exit input : Wq for Save and exit

Cat xxx View xxx file contents

Head xxx View xxx file header content head-n 1 xxx You can specify the number of rows to display after the number of-N is displayed

tail xxx view xxx file trailer content tail-n 2 XXX You can specify the number of rows to display after the number of-N is displayed

grep '2' xxx search xxx file contains 2 content

CP a.txt a1.txt Copy the A.txt file to the current directory and named A1.txt

MV A.txt src/a1.txt Move the a.txt file to the SRC directory and named A1.txt

RM xxx Delete xxx files, this deletion is not recycle Bin so delete need to be cautious

Login action

SSH [email protected] SSH mode login, enter--input password

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.