Create a new group in Linux

Source: Internet
Author: User
Create a new group in Linux-Linux general technology-Linux technology and application information. For more information, see. If you want to create a new group, use the groupadd command. For example:

Groupadd myfriend

Tip: This command adds a new group named myfriend to the/etc/group file. If the image password is used, the new group is also added to the/etc/group file.

By default, the groupadd program creates a new group with a GID value greater than 499 because ~ 499 this value has been retained by system-level accounts such as root and bin. Therefore, if the GID of the last group on the/etc/group file is set to 532, you can use this program to create the GID of the new group and set it to 533. If you want to specify the GID value for a new group, you can use the-g GID option. In addition, if you want to create a new group, its GID value ranges from 0 ~ Within the range of 499, use the-r option with-g GID to force the new group created by the groupadd command to become a group at the system level.

Please note that if the group or GID you are trying to create using this program already exists in the/etc/group file, an error will be returned.
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.