Sitemap
Anush Lobo

Anush Lobo

Linux file system

4 min readOct 27, 2026

--

linux is a multi-user operating system , meaning more than one user can login at a same time.

In linux everything starts from a root directory that starts from just a /

Think of it as a trunk of a tree every file is associated and connected to it

Path

A path is just the address of the file or document and a absolute path always starts from the root .

relative path starts from whereever u currently are .

/bin

this folder has all the commands that everyone in the system use such as ls ,cp,mv,mkdir,cat,rm.

Its kind of a tool box to the system .

/home

This is where the regular user live and then /root is the superuser

/USR

unix system resources when u download any application its main files goes and saves in the /usr/bin and libraries in the /usr/lib

Now we will understand about the Users and Groups and adding the user in the group

linux is a multi-user operating system , meaning more than one user can login at a same time.

u can add multiple user in the linux system so in order to restrict the user from some of the permission or to give the user certain permissions we use the group.

Group

It is a isolated area in which in which multiple user can be sitting and this group has perticular privilage to write perticular files and read them those kind of power .

User management is very crusial in the linux system there are multiple steps where in u can achieved that i am listing few them in here

first command in order to see who u are in the system or the linux system as to know ur identity right for that there is the command called

whoami

this will give u the username in the system so using that name and some other credentials only u are identified in the system

when i want to know lets say what is the user id or the group id and other information about my identity then use the command called as

id 

this will give u the identity details of the user .

Get Anush Lobo’s stories in your inbox

Join Medium for free to get updates from this writer.

how to create a new user in the system,then i need to create a group that is using the command

sudo groupadd devops

Now lets say i want to create a new user in the machine then

sudo adduser rahul

these are the other details that u might have to create related to that user .

Now the user and the group is created how to verify that they are created

id rahul

it will give me the information of that user .

u will have a home directory configured for each of the user now u can change it using the commands such as

Yes. Your current Linux username is nineleaps, and your UID is 1001. You want to change your home directory from /home/nineleaps to /home/nineleaps/anush.

We can do that, but changing the configured home directory and moving your existing files are two separate things.

Step 1: Create the new directory

Run:

sudo mkdir -p /home/nineleaps/anush

This creates the anush directory if it doesn't already exist.

Step 2: Change the configured home directory

Run:

sudo usermod -d /home/nineleaps/anush nineleaps

So now the groups are created and give it the permissions or define what power or access or permission the people existing in that group can have and then add those people and then using that group the people in system can download or delete or do operation in the system like group sudo a major one which can be there and if the root or the admin user adds ur user name in that group only then u can do such operation in that home directory or folder whereever u have access to, u can do those operation like downloading the applications using the sudo commands.

Any user u create in the linux the system automatically assigns a home directory to that user. so when he is logged in he cannot land in any file so in order to keep a place of landing the system assigns the home directory to the user.

So we had created the group called as devops so to see the details about it lets go in details

grep rahul/etc/group

if in case u dont define the group where the user rahul as to be in then the linux by default creates the same name group and puts him in that group

now we had the user to a perticular group and the command that we use is

sudo usermod -aG devops rahul

and then do the id again u will get the details if u are added to that group or not .

how to login in that rahul user now

the command is

su - rahul

it will ask for the password

--

--