Linux basic Commands Daquan

Source: Internet
Author: User
Tags ftp connection

Linux system basic commands: to distinguish case
Uname display version information (same as Win2K ver)
DIR Displays the current directory file, Ls-al display includes hidden files (dir with Win2K)
PWD Query the directory location where you are currently located
CD/Return to the root directory.
CD ~ Current user's home directory
Cd ~ User name Specify the user's home directory
Su-User temporarily switch user
Du-sh viewing the size of a compressed file
DF-HT file's path file mount point and usage of the corresponding device
Cat file name view file contents
Cat >abc.txt The contents of the Abc.txt file.
Ls See which documents are in the directory
LS-LH viewing the size of a file
Ls-a includes hidden documents that begin with.
Ls-l display in long format (details)
Ls-h provides easy-to-read capacity units
LS-LD/directory lists the properties of the directory itself
More file names display a text file in a page-by-page fashion.
Cp-r Copy file-F override
MV Moving files
Mount-a checking and mounting the device
Umount Unloading mounted devices
RM file name Delete file,-R prompt to delete-rf without prompting (force delete)
Mkdir-p Directory name creation directory
Touch Create File
RmDir Delete subdirectories, there are no documents in the directory.
Route-n checking the native routing table (including the default gateway)
chmod setting access rights to files or directories
Chown Changing document Attribution
Grep finds a string in the archive
Hostnamectl set-hostname + Name change name
Useradd (add), passwd (password), Usermod (attribute), Userdel (delete) user account management
Ifconfig View IP
ZIP Create backup file-ry link
cat/etc/resolv.conf View Domain name address
Diff file Comparison
Find Archive Search
Date, time of day
Who queries the person who is currently using the same machine as you and the login time location
W Query the details of the current person on the machine
WhoAmI to see your account name
Command line > new file name Save (redirect) (Unix2dos for line wrapping)
Zip + new File Guide Package Save
passwd Change Password
History View the commands you've been under
PS Display process Status
Kill stops a process
GCC hackers usually use it to compile files written in C language.
The SU permission is converted to the specified consumer
Telnet IP Telnet connects to the other host (same as Win2K), indicating that the connection was successful when bash$ was present.
FTP FTP connection on a server (same as Win2K).
View all connections NMCLI connection show
Manually modify IP gateway DNS nmcli Connection Modify eno16777736 ipv4.method manual ipv4.addresses 192.168.72.120/24 ipv4.gateway 192.168 .72.1 Ipv4.dns 192.168.72.2
Activating NMCLI Connection up eno16777736 (connection name)
Automatic modification NMCLI Connection modify eno16777736 connection.autoconnect Yes
Delete connection: NMCLI connection Delete eno16777743
Add Connection: NMCLI connection add con-name NETWORK1 ifname "NIC name (eno167777)" type Ethernet
Create a file with touch: Touch/notes/cloud/{f1.txt,f2.txt,f3.txt}
Vim: Press I to enter input mode
Press the ESC key to return to command mode
Press: Enter the last line mode
Enter Wq save to exit
Vim modifies DNS server address nameserver DNS server address
Command mode:
Copy 3 lines (3YY), paste (p), delete 3 rows (3DD)
Delete 第5-10 line (5G, then 6DD)
Save and exit (ZZ)
Undo Last Modification (U) undo All (Capital U) redo just undone operation (CTRL+R)
Last-line mode:
Delete line 5th to 10th (: 5, 10d)
Save As New file: (: w net.txt)
第5-10 line Save As new file (: 5, 10w New.txt)
Display line number (: Set NU)
Do not save and exit (q! )
Save and exit (: Wq,: x)
Replace 5-10 all letter Q with a (: 5,10 s/q/a/g)
Delete A (:% s/a//g)
Add # at the beginning of 5, 10 lines (: 5,10 s/^/#/g)
Delete # at the beginning of 5, 10 lines (: 5,10 s/^/#//g)
Shift+ctrl+t Opening a new page
Ctrl+l Empty the entire screen
CTRL + C discards the current command line
Ctrl+u empty to First line
Ctrl+k Empty Line
Ctrl+w Delete Current one letter
esc+. Paste the arguments of the previous command

Linux basic Commands Daquan

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.