Today I am Posting here the Tutorial on Linux File System (LFS).
Every Linux File System includes some of the Basic Directories which are installed or are there on the System at the time of Installation of the Distribution.
Basically there are actually 17 Directories which are Installed at the time of Installation of any Linux Distribution.
You can view these Directories either graphically or using console.
Every Linux File System includes some of the Basic Directories which are installed or are there on the System at the time of Installation of the Distribution.
Basically there are actually 17 Directories which are Installed at the time of Installation of any Linux Distribution.
You can view these Directories either graphically or using console.
To see Graphically (Taking on Red Hat Linux 9 Distribution)
Just click on the "Root's home" icon on your desktop and replace the "/root" with only "/" in the address bar of the window.
This will take you to the all the Files and directories available in the root or on the System.
Note: But its recommended that you must use the console method if you are the beginer with the linux file system, that will help you learn more clearley.
To see Using Console (Taking on Red Hat Linux 9 Distribution)
By Default shell takes you to the "home directory" and if you are logged in as the root user your home directory will tbe the "/root".
To show all the pre installed directories we have to go to the very root of the system i.e root of the directory which is indicated by the "/".
to go to "/" if you are not presently in the very root of the directory.
type "cd /" without quotes and press enter.
after this your address must look like this
[root@rhle /]#
now do "ls" without quotes
This command will display all the various root files and directories that are available that can we use.These Directories are installed or made by default when we are installing the Distribution.
Following are the List of Directories which are Displayed i.e Which are Installed already on the system:
1.bin 2. dev 3. home 4.lib 5. misc 6.opt 7. root 8. tmp 9. var 10. boot 11. etc 12. initrd
13. lost+found 14. mnt 15. proc 16. sbin 17. usr
Note : In the First Part of the Tutorial we will be dicussing only 4 Directories
i.e bin, boot, dev, etc.
The remaining of the Directories will be Discussed in the next part of the tutorial.
The remaining of the Directories will be Discussed in the next part of the tutorial.
So lets start with the first one...
1. bin
"bin" directory is designed to have by default basic binaries. Basic Binaries are the commands or you can say system utilities which are accessible by all the users of the system. Almost all the commands that we use for most part in Red Hat Linux enviornment for most of the user of the system are found in the bin directories.
we can do ls bin/ to see all the directories and files present inside the bin directories.
some are as follows:
ln - it is used for creating links.
gawk
cut and many more.
Some of the example of the utilities that the bin directory includes are as
1.ls - to list all files
2.clear - to clear the screem
3.cat - to view the file in txt format or else also
4.cp - to copy the file
5.mv - to move the file
6.date - to reveal the system date
7.dd
8. df
9.echo - to print anything on the screen just like printf in 'c'
10. kill - to kill any process
11. ps - to show the process status
To know where the particular binary is located we can use which command.
syntax: which <binary name>
Eg: which ls
which cp
which dd and so on.
2.boot:
This Directory basically deals with the kernel of the system so it includes various files related to the kernel.
To see the files inside the boot directory we can do
ls boot/ and press enter
The above command will list all the files under the boot directory which are related to the kernel even including the kernel itself. You can see the kernel in this list.
There is one more directory inside this directory i.e you can see is the grub directory.
Grub is the boot loader of the system,it is related to the kernel. It starts the system so its also located here in the boot.
when will do "df -h" it will list all the physical partition on the system hard disk.
3. dev
This directory is very important directory because the physical devices which are attached to your linux system can be found within the 'dev' directory.
we can explore the dev directory by doing the 'ls dev/' without quotes
After you list the files of the dev directory you will see many types of the devices listed. These devices entry in here are almost for all the devices that you can imagine.
If we insert a USB in the system which is compatible with the linux there will be a device located in the '/dev' directory that will support your particular piece of hardware. Or if you install the software that comes with the device there will be dev file that will be placed in '/dev' directory for you.
In addition in /dev directory we can find files for the standard input devices i.e keyboard,mouse,monitor,printer,headphones (all USB devices).
4. etc:
as per the File system hierarchial structure the 'etc' directory must contain configuration files,host specific files.
So anything specific with the particular host should be contained in the etc directory and typically you will find the configuration files that pretends to following
IP addresses information, DNS Information, DHCP Information, Network Informationn etc.
/etc structure are assigned by the file system structure to contain the host specific files.
Eg: Files that will end with extension ".conf"
To view the .conf files.
we have to do this:
cd etc/ - this will take you inside the etc directory
ls *.conf -this will list all the configuration files. For Eg: dhcpd.conf and many others.
So here we come to the end of the first part of the tutorial will see you soon in the second part of the tutorial. There we will be discussing the another 4 directories.
Thank you.


Comments
Post a Comment