002day -- common linux commands and common linux commands

Source: Internet
Author: User

002day -- common linux commands and common linux commands

Exit terminal command: exit

Command to disable Linux: init 0

How to switch the virtual terminal: Ctrl + Alt + F [1 ~ 6]

Who command: check how many terminals are open

Whoami command: Get the current user name

Date command: view the time and date

Cal command: View calendar

Clear command: clear screen (or Ctrl + L)

Su command: su-root (root user running and access)

Passwd command: Change User Password

Pwd command: displays the user's current working directory in an absolute path

Ls command: used to display the target list

Cd command: used to determine and switch Directories

Mkdir: Create the folder mkdir-p/boot/aaa, create boot first, and then create aaa

Ls-d/boot/a to view files in the specified directory

Mv command: mv/boot/aaa/boot/bbb move aaa to boot and rename aaa to bbb

Rm-rf/boot/aaa delete all sub-files in aaa and Its Directory

Rmdir command: delete an empty directory

Touch command: Creates the aaa.txt file by using touch aaa.txt.

Cat command: View File Content

Head: head-n 1/tmp/aaa.txt displays the first line of the file

Added tail-f/tmp/aaa.txt Dynamic Monitoring File

Echo qwer>/tmp/aaa.txt write qwer to the file to overwrite the original content

Echo qwer>/tmp/aaa.txt writes qwer to the file in append Mode

More command: each time a screen (one page) file content is displayed on the screen more + 3 aaa.txt display log content from the third line

 

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.