Linux exam easy to forget command

Source: Internet
Author: User

This is a note for the exam.

  

MV command can be moved can be renamed

1 MV a/test    // move A To test folder 2 mv a b         // rename A to B

 

Soft links and hard-link creation

1 ln-s profile a    //profiles Create a soft link a2 ln        /b// profile file creates a hard link B

Find Files

1 Find NewFile    // Find files with name NewFile

Compiling the C language code

1 vim hello.c               // I have written a C language file 2 gcc-g hello.c-o a     //  Compile this file into a3 ./a                           // run a

  

Create a new user User01, and set its home directory to/home/user01

1 useradd-d/home/user01-m User01

Set a password for a user

1 passwd User01

Lock, Unlock, rename

1 passwd-l user01                 // Lock user 2 passwd-u user01                // unlock user  3 usermod-l user02 user01    // renamed User01 to User02     

View users and groups for this information

CAT/ETC/PASSWD       // user   Cat/etc/shadow       // user cat/etc/ GPASSWD      // Group

Group

1 groupadd stuff      //  Create a new group, stuff2 useradd–g stuff–g stuff user02   //
     Create a new account User02 and set his start and subordinate groups to stuff3 gpasswd stuff     // Group stuff setting Group password 4 gpasswd–d user02 stuff   // Delete user user02 in group stuff5 Groupdel Stuff             // Delete group

  

  

Linux exam easy to forget command

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.