Group (on Linux)

Share

What is a Group on Linux?

On Linux, a group is a way to categorize multiple users in the operating system. Every file and folder on Linux belongs to one user and one group. When a new user is created, a new group with the same name as the user is created. For example, if you create the user john, a group called john is also created. Any files that john creates belong to the john user AND the john group. Groups can be used to share files between users by changing which group the file belongs to without changing which user the file belongs to. Groups have a separate set of RWX file permissions. For example, you can have a file that you can read and write (modify), but the other members of your group can only read (can't modify).

Groups can be manage on Linux Mint via Users and Groups on the start menu. The group of a file or folder can be changed on its file properties dialog or through the terminal with the chgrp terminal command.

A diagram showing the relationship between three components: hard links, inode, and disk. The hard links /foo and /bar are associated with the number 42 (this is the data in a directory block). The inode has properties such as being the number 42, having the owner 2, the group 2, having 2 hard links, the permission rwxrw-r--, and multiple pointers to blocks, namely, 1, 2, 12, 25, and 15, following by 5 pointers set to 0. The disk component has blocks (e.g. 4096 bytes each) that are pointed to by arrows according to the numbers in the inode component. The blocks 1, 2, 12, and 24 are coloed orange. The last block pointed, 15, is colored partially orange.
A diagram showing the relationship between hard links, inodes, and disk blocks on Linux [How Hard Links and Inodes Work on Linux].
Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments