Quick Answer: How to Create a Group in Linux?
Contents

How do I create a group in Unix?

To create a group called oinstall , enter the following command.

This group is the primary group for the oracle user.

To create a user called oracle and assign the user to the oinstall group, go to the /usr/sbin/ directory and enter the following command.

How do I create a new user group in Linux?

See explanations of the gpasswd and sg commands below.

  • Create a New User: useradd or adduser.
  • Get User ID and Groups Information: id and groups.
  • Change the Primary Group of a User: usermod -g.
  • Add or Change Users in Secondary Groups: adduser and usermod -G.
  • Create or Delete a Group in Linux: groupadd and groupdel.
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest