π€ Day 7 of My Linux Journey β Understanding Users, Groups & Ownership


Assalamualaikum tech fam!
I'm Fiza, and welcome back to my Linux learning journey! Every day, Iβm diving into a new Linux concept and sharing what I learn here on Hashnode β this is Day 7 of my #100DaysOfLinux series! π
Yesterday, I explored file permissions, and today, I went one step further into the world of users, groups, and file ownership β a key concept in Linux administration.
---
π§βπ» What Are Users & Groups?
Linux is a multi-user system, which means multiple users can exist and work on the same machine. Each user is assigned:
A username
A UID (User ID)
Users can be organized into groups, which share certain access privileges.
π See who you are (current user):
whoami
π₯ View all users on the system:
cat /etc/passwd
This file stores user account information.
---
π Understanding File Ownership
Each file and folder in Linux is owned by:
A user
A group
You can view this with:
ls -l filename
Example output:
-rw-r--r-- 1 fiza developers 120 May 30 10:00 notes.txt
fiza β file owner
developers β group that has access
---
π Managing Ownership
πΈ Change file owner:
sudo chown newuser filename
πΈ Change file group:
sudo chgrp newgroup filename
πΈ Change both:
sudo chown newuser:newgroup filename
\> π You need sudo privileges to change ownership.
---
π Recursive Ownership Change
To change ownership of an entire folder and all its contents:
sudo chown -R user:group /foldername
---
π§ Key Takeaway
Understanding users, groups, and ownership is essential for setting up proper access control on a Linux system. Itβs the foundation of user management and security.
---
π Stay Connected!
If you're finding these Linux articles helpful, drop a follow here on Hashnode so you never miss an update!
View My Linux Projects on GitHub
π [Check out my GitHub](https://github.com/devopslover540)
See you in Day 8 β where Iβll explore Process Management in Linux! π
#Linux #100DaysOfLinux #SysAdmin #FOSS #LinuxBasics #Hashnode #FizaOnLinux
---
Would you like me to write Day 8 next (Process Management), or do you want to cover something else tomorrow? Let me know!
Subscribe to my newsletter
Read articles from Fiza_devops_lover_540 directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Fiza_devops_lover_540
Fiza_devops_lover_540
> "Learning Linux, Git, and Shell scripting on my path to becoming a DevOps Engineer. Sharing my tech journey step by step." "Aspiring DevOps Engineer on a journey from Git to the Cloud. Learning Linux, mastering Shell scripting, and exploring automation one command at a time. Sharing my DevOps learning path and experiences as I grow."