Page 35 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 35
Operating System Tools
Notes Linux chooses to be case sensitive. This signifies that the case, whether in capitals or not, of the
characters becomes very significant. So this is not the same as THIS or ThIs for that matter. This
one feature probably causes the most problems for newbies.
We now move on to the layout or the directory structure of the Linux filesystem. Given below is
the result of a ‘ls -p’ in the root directory.
bin/ dev/ home/ lost+found/ proc/ sbin/ usr/
boot/ etc/ lib/ mnt/ root/ tmp/ var/
Some Top-level Directories are Discussed Below:
/sbin – This directory includes all the binaries that are important to the working of the system.
These comprise system administration in addition to maintenance and hardware configuration
programs. Find lilo, fdisk, init, ifconfig etc. here. These are the essential programs that are
required by all the users. Another directory that contains system binaries is /usr/sbin.
This directory includes other binaries that are useful to the system administrator. This is where
you will find the network daemons for your system along with other binaries that only the system
administrator has access to, but which are not required for system maintenance, repair etc.
/bin - In comparison to /sbin, the bin directory includes various useful commands. Both the
system administrator and non-privileged users make use of these commands. This directory
usually contains the shells like bash, csh etc. as well as much used commands like cp, mv, rm,
cat, ls.
There also is /usr/bin, which contains other user binaries. These binaries on the other hand are
not essential for the user. The binaries in /bin however, a user cannot do without.
/boot - The system.map file and the Linux kernel are contained in this directory. LILO places the
boot sector backups in this directory.
/dev - This directory highlights one significant feature of the Linux filesystem, that is, everything
is a file or a directory. Look through this directory and you should see hda1, hda2 etc., which
represent the various partitions on the first master drive of the system. /dev/cdrom and /dev/
fd0 represent your CDROM drive and your floppy drive. This may seem strange but it will make
sense if you compare the characteristics of files to that of your hardware. Both can be read from
and written to. Take /dev/dsp, for instance. This file represents your speaker device. So any data
written to this file will be re-directed to your speaker. /etc – All the configuration files for your
system are included in this directory. Your lilo.conf file lies in this directory as does hosts, resolv.
conf and fstab. Under this directory will be X11 sub-directory which contains the configuration
files for X. More significantly, the /etc/rc.d directory contains the system startup scripts. This is
a good directory to backup often. It will definitely save you a lot of re-configuration later if you
re-install or lose your current installation.
/home – Linux is considered as a multi-user environment. Thus every user is also allocated a
specific directory which is accessible only to them and the system administrator. These are the
user home directories, which can be found under /home/username. This directory also includes
the user specific settings for programs such as IRC, X etc.
/lib - All the shared libraries needed by system programsare included in this directory. Windows
equivalent to a shared library would be a DLL file.
/lost+found – There should always be a proper shutdown in Linux. At times, your system might
crash or a power failure might take the machine down. Either way, at the next boot, a lengthy
filesystem check using fsck will be done. Fsck will go through the system and try to recover any
corrupt files that it finds. The result of this recovery operation will be placed in this directory. The
files recovered are not likely to be complete or make much sense but there always is a chance that
something worthwhile is recovered.
28 LOVELY PROFESSIONAL UNIVERSITY