Linux File System| In Easy Terms

Hello, everyone In this Article we are going to learn what is the File System in Linux in a very simple and easy step-by-step approach.

linux file system

Linux File System

When we Install the Linux kernel it is installed in one of the partitions called root and that root partition is mounted in the root directory in the Linux kernel

/ is called as root directory in Linux in this directory our root partition is mounted on / directory.

If we want to see the directory structure in our operating system then simply go inside the / directory and execute the below command.

# ls -l
Screenshot 1 29

There will be a number of subdirectories inside { / } root directories total is 19 subdirectory inside the root directory like-:

root -> In this directory whatever the root user do the work here that is placed inside the /root directory

boot -> In this directory all the booting file is stored that use to boot up the operating system

etc -> All system configuration stored here all software, Server configuration files goes here

bin -> All Linux commands stored here

sbin -> Here Linux Commands stored here but these commands only executed by root user

tmp -> For storing temporary data

dev -> All hardisk / Pendrive that we insert goes here

home -> Normal user home directory. At the time of installation of the user, we created that user name home directory placed here. If we created more user then with that user name directory is created

lib -> Libraries stored 32 bit

lib 64 -> 64 Bit libraries stored

opt -> In the future if we install any 3rd party software we will install that goes here

proc -> All process running in linux stored here all process id

mnt -> Mounting information Like if we attached pen drive then it’s information goes from here

run -> Any media device when we attach help to run that device

usr -> All linux commands documentation stored here

var -> This directory store the variable data in which the Operating system writes when it doing its operations.

Syntax of writing any command

To write any command in the Linux syntax is shown below

command [options…] [arguments…]

We can enhance the functionality of the command when we use the option in the command.

We can use arguments when we want to execute the command on a specific location. Sometimes

Please note that we can skip the options and arguments. If we skip both the options and arguments then the command will run in the current location.

Some Important Commands in Linux For Linux File System

( Present working directory ) Below command gives us information about the location where we are currently in

# pwd
Screenshot 1 30

(Change directory ) -> Below command is used to change the location of the current working directory. Here we are changing the location to /tmp/ directory.

# cd /tmp/
Screenshot 2 29

If We want to go to the last working directory but We don’t remember the last location of the directory then we can use the ( cd – ) command.

For Example, we are going inside /tmp directory. Then we are going inside /media directory.

Again we want to go inside the /tmp directory then we can use the ( # cd – ) command.

# cd -
Screenshot 6 27

If We want to go back by one step in directory we can use ( cd .. ) command

# cd ..
Screenshot 4 26

We want to go back by two step in directory we can use ( cd ../.. ) command

$ cd ../..
Screenshot 5 28

Similarly If We want to go back by three-step in the directory we can use the ( cd ../../.. ) command.

Conclusion

If you want to learn Linux in the most simple language then please click on this link.

If you want to read Wikipedia for the Linux file system then click on this link

This is the complete knowledge of the Linux File System if you have any doubts please feel free to comment below. Please don’t forget to join our email subscription to get the latest updates on DevOps Articles.

Leave a Comment