πŸ‘€ 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!

0
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."