Linux Introductory Learning (vi)

Source: Internet
Author: User

Lesson 13:linux Getting Help

    1. Almost all commands can use-h or--help to get help information
    2. The man command is Linux for detailed help information, the man document is divided into many types:

    3. Man–k documents that contain keywords
    4. Info is similar to man, and the information provided is updated to be detailed and displayed in a web-like format
    5. Both man and info can be searched using the/+ keyword method
    6. Many programs, commands are also very detailed documentation, such as txt,html,pdf in the/usr/share/doc directory, these documents are the most detailed documentation of the corresponding program

Lesson 14:linux user Base

    1. When you log in to Linux, you must be logged in as a user, a process needs to run as a user, and the user restricts the control of the resource to the consumer or process.
    2. Each user belongs to a primary group, and the group named as the group name of the user is the primary group, and can belong to the 0-N satellite group
    3. Each group has a groupid
    4. Each user who can log on has a specified shell
    5. The user ID is 32 bits, starting from 0, the old user ID is limited to below 6w, the user is divided into three types: root (the user with id 0 is the root user), System User (1-499); normal User (500 or above).
    6. The files in the system have a group that belongs to the user level. Use the ID command to display the currently logged in user information
    7. The passwd command can modify the current user password.
    8. Related files:/etc/passwd save user information;/etc/shadow Save user password (encrypted);/etc/group Save Group Information
    9. View logged on User: whoami-Displays the current user, who-shows which users have logged on to the system, W shows which users are logged in, and what is being done
    10. Useradd User name creation user. -D Home Directory,-s login shell;-u userid;-g Primary Group,-G subordinate group (up to 31), multiple use, delimited. It can also be implemented directly by modifying/etc/passwd, but is not recommended. -
    11. /etc/skel the newly created user will copy all the files in this directory to the new user's home directory, which is actually the user template.
    12. Modify user information: Usermod parameter username–l: New user name;-u: New user id;-l lock user;-U unlock
    13. Delete User: Userdel username delete user, userdel–r username Delete user and delete home directory
    14. Groupadd name Create Group, Groupdel name Delete Group,-G modify Group Id;-n group name

Class 15:linux Authority mechanism

    1. Linux has three permissions per file: R W x, the directory must have X permissions, or its contents cannot be viewed
    2. Linux permissions are controlled based on the UGO Model: U stands for user; G represents Group;o on behalf of other

    3. Chown user name, modify the owner of the file to which it belongs;-R recursively the owner of all files under the modified directory
    4. CHGRP groupname name, modify the group to which the file belongs;-R recursively group of all files under the modified directory
    5. chmod mode file, modify the permissions of the file. U,g,o represents users, groups, and others, a-ugo,+-represents the addition or deletion of the corresponding permission; rwx represents three permissions. Example: chmod u+rw name;chmod g-x name;chmod go+r name;chmod a-x Name
    6. To modify permissions digitally: R=4,w=2,x=1. Example: chmod 660 name;cmode 775 Name

?

Lesson 16: Default Permissions and Special permissions

    1. Each terminal has a Umask property, specifying the default permissions for new files, folders, umask using digital permissions, such as: 022
    2. The default permissions for the directory are: 777-umask; The default permissions for files are: 666-umask. In general, the default umask for normal users is the default umask for 002,root users is 022
    3. Command umask view umask value; umask value, setting umask value
    4. Special permissions: Suid,sgid,sticky. Suid, executed as the user of the file, not the user who executed the file; Sgid, as the file belongs to the group, the attribute group of any new file created in the directory is the same as the owning group of that directory; sticky, a user with write permission to a directory can only delete files that it owns. You cannot delete files owned by other users.

Linux Introductory Learning (vi)

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.