Linux common commands (1)

Source: Internet
Author: User

Common commands (1) 1. System-related commands
Su Switch users
Hostname View Host Name
W.H.O. View users logged on to the system
WhoAmI Confirm your identity
History View the history of running commands
Ifconfig View network devices
Ping Check the connectivity of the network
Kill Kill process (kill-9 process number-----force kill process)
Date Show Date
------Date-s Time or date Modification time

2. Directory Operations Command
Pwd View current Path
Main Bring up the command help manual
Cd Switch directories
CD./ Current directory
Cd.. / Switch to Parent directory
CD/ Switch to the root directory
CD ~ Switch to User home directory
CD Directory Name Switch relative to the path
CD/directory Name Toggle under Absolute Path
Mkdir Create a Directory
mkdir Directory Name-P Create a directory with paths
RmDir Delete Empty Directory
Rm-rf Force Delete
Relative path: path absolute path starting from the current directory: path starting at root 3. File Operations Command
Ls View directories and files
Ls-l Show file familiarity
Ls-a Show all files (including hidden files)
Cp Copy command
Cp-r Copy all directories and files under directories and directories
CP file name/directory destination Address Copy file/directory to destination address
CP a file B file Copy a, and rename the A file to B
Mv Move command
MV file name/directory destination Directory Move File/directory to destination directory
MV A file B file Move a, and rename the A file to B
RM File: / Move files to the parent directory
4. File editing commands
Vi
VI a.txt Call Method:
I Enter edit state
Esc Exit Edit State
: Q Do not edit exit
: q! Force exit
: Wq Save exit
/query Content Search
G Navigate to First line
G Navigate to Tail Line

Linux common commands (1)

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.