Linux Command Memo (CentOS 7)

Source: Internet
Author: User
Tags clear screen create directory parent directory

    1. Create directory testdir:mkdir  testdir
    2. Enter directory testdir:cd testdir
    3. Create empty file in TestDir 1:   Touch 1
    4. Create empty file in TestDir 2:   Touch 2
    5. Delete file 2:rm 2
    6. Delete Empty directory: RmDir dirname
    7. Delete Non-empty directory: RM-RF dirname
    8. Copy file: CP 1 2 (copy file 1 to file 2)
    9. file movement: MV 1 dir (move file 1 to directory dir)
    10. directory move: MV dir dir1 (move dir to Dir1 below)
    11. back to root directory: CD/
    12. return to the current user's home directory: cd ~
    13. return to Parent directory CD:
    14. list all contents in directory: LS
    15. List permission information for all content under directory: Ls-l
    16. View your current working directory: PWD
    17. Clear Screen: Clear
    18. View Ip:ifconfig
    19. Switch User: su root (switch to root user)
    20. Shutdown: Shutdown (This version I use only the root user can execute shutdown command)
    21. Create User: Useradd testuser1
    22. Add or change password to the specified user: passwd testuser1 (change password to testuser1)
    23. Delete User: Userdel testuser1
    24. Create group: Groupadd gtest
    25. View the group information for the current User: Groups
    26. add a user to a group: Usermod-g gtest testuser1 (add testuser1 to Gtest group

Linux Command Memo (CentOS 7)

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.