Linux Common Commands ~ Novice must know

Source: Internet
Author: User

ifconfig View native IP

LS View all files and folders in the current directory

Cd/user Open the User folder if you do not know the full name of the folder to open or long, you can press the TAB keyboard Auto-completion, such as: cd/u + Table key, the system automatically help us into the/user

Create a file

mkdir Test Create Folder

Touch Test.txt Create a file

Edit File

VI test.txt Open test.txt file

C Press the C key on the keyboard to switch from the read-only state to the edit state

ESC switches from edit state to read-only state

: Q is exited (when the file has not changed)

: q! Do not save the exit (when the file changes)

: Wq Save and exit

Copying Files

CP test.txt test2.txt Copy the Test.txt file under the current folder to a Test2.txt
CP test.txt/hzh/test Copy the Test.txt to the/hzh/test directory

deleting files

RM aa.txt Delete aa.txt file

rm-r bb Delete the BB directory (including all files under the directory)

Move
MV Dd.txt. Move the Dd.txt file to the top-level directory (note the two points at the tail)
MV bb.txt/hzh/test/Move the Bb.txt file to the hzh/test/directory
Renamed
MV Dd.txt Dd2.txt renamed Dd.txt to Dd2.txt
Find
Locate Aa.txt Check the Aa.txt file in the entire system, locate\slocate the command followed by the file or folder. However, to update the database before executing this command, choose the Execute UpdateDB command.

System commands

DF-LH Viewing disk information

Lsb_release-a viewing all version information of the system

Free View memory Information

PS View the currently running process

Kill-9 QQ.exe Terminate process, 9 means the forced process stops immediately

Shutdown command

Shutdown now immediately shuts down the machine

Shutdown +5 5 minutes after shutdown

Shutdown 23:10 Setting up the system shuts down at 23:10

Shutdown-r now shut down the system and reboot

Linux common Commands ~ Novice must know

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.