Linux basic commands

Source: Internet
Author: User

Online about the Linux command a lot of detailed, I will put some common commands to collect and paste it, for everyone to view (note: Will simply mention, the specific operation please see the relevant information)

1. Add: A. File touch filename

B. folder MkDir folder

C. User AddUser new user (after adding "passwd new user" to modify the password, should be added under the root user)

2. Delete: A. File rm-f filename

B. Folder Rm-rf folder

C. User Userdel user name (use "Userdel-r username" to delete users and delete their home directories and files)

3. Modify: Use the VI command to enter the file and modify the content after using ": Wq" or ": X" to save the modified file content, if not modified using ": Q" exit, if modified but do not intend to save use ": q!" Exit

4. Query: Use cat file name to view

Use tail file name to view

5. Clear the screen: clear (very common command)

6. Switch directory: CD directory name (only use CD will switch to the current user's home directory)

7. Compress the file into a package:TAR-ZCVF package name. tar.gz Folder

8. Unzip the package: TAR-XZVF package name. package name suffix

9. View process: Ps-auwx (followed by "grep xxx" can be filtered, xxx for you to query the keyword)

10. Kill Process: Kill-9 process Number (process number can be queried by 9th command, process number is the second column found)

11. View all the files under the folder: Ls-i (LS is a common use)

12. Modify file Folder permissions chmod + permission number file or folder (+--that is, to cancel a permission, = to overwrite other permissions with this permission)

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.