Saturday, February 28, 2009

Class 10 The gnu-Linux File System


The first thing that most new users shifting from Windows will find confusing is navigating the Linux filesystem. The Linux filesystem does things a lot more differently than the Windows file system.This article explains the differences and takes you through the layout of the Linux filesystem.there is only a single hierarchal directory structure.Everything starts from the root directory, represented by '/', and thenexpands into sub-directories.Windows, the various partitions are detected at boot and assigned a drive letter. Under Linux, unless you mount a partition or a device, the system does not know of the existence of that partition or device. This
might not seem to be the easiest way to provide access to your partitions or devices but it offers great flexibility.

the file system can be classified accourding to the purpose
1)Sharable/Variable
2)Unsharable/Static For eg:

                    Sharable                        Unsharable
..................................................................................
Static           /usr                                    /etc                      
                    /opt                                    /boot

..................................................................................
Variable     /var/mail                             /var/run
                   /var/spool/news                  /var/lock


We cant load them in a different file system location(partition) for eg, we cant load /etc & /lib in other partiotion.it should be under / the (root).here is the list of files n directories under / for fedora linux:

bin
boot
dev
etc
home
lib
lost+found
media
mnt
opt
proc
root
sbin
selinux
srv
sys
tmp
usr
var

some explanations:
/usr->Unique System resource
/etc->Configuration files
/opt->Optional packages
/boot->boot files
/var->variable
/bin->essential executables for every user & to be used in single user mode
/sbin->essential system executables
/lib->essential shared libraries & kernel modules
/boot->static files of bootloader
/dev->device files & scripts called MAKEDEV,device types-c,h,d,b,l

the major no: & minor no: is used by kernel to identify a device
Major no:- it is an indication for which device driver should be used to acess a particular device.
Minor no:- is which tells the kernel the special characterstics of the device to be acessed.

to know the malor & minor no: of a device :- ls -la 'device name' eg: ls -la sd*

we should be familiar with the most of the files n directories under /etc. These files are of high imoprtance and should be modifiled for administration and for trouble shooting! the files n directories under /etc for fedora are:

adjtime
aliases
aliases.db
alsa
alternatives
anacrontab
anthy-conf
asound.conf
asound.state
at.deny
audisp
audit
avahi
bash_completion.d
bashrc
blkid
bluetooth
bonobo-activation
chkconfig.d
ConsoleKit
cron.d
cron.daily
cron.deny
cron.hourly
cron.monthly
crontab
cron.weekly
csh.cshrc
csh.login
cups
dbus-1
default
depmod.d
dhcp6c.conf
DIR_COLORS
DIR_COLORS.256color
DIR_COLORS.xterm
dirmngr
dnsmasq.conf
dnsmasq.d
dumpdates
enscript.cfg
environment
esd.conf
ethers
event.d
exports
favicon.png
fb.modes
fedora-release
festival
filesystems
fonts
foomatic
fstab
gconf
gcrypt
gdm
ghostscript
gimp
gnome-vfs-2.0
gnome-vfs-mime-magic
gnupg
gpm-root.conf
gpm-syn.conf
gpm-twiddler.conf
gre.d
group
group-
grub.conf
gshadow
gshadow-
gssapi_mech.conf
gtk-2.0
gtkmathview
hal
host.conf
hosts
hosts.allow
hosts.deny
httpd
idmapd.conf
init.d
initlog.conf
inittab
inputrc
iproute2
issue
issue.net
jwhois.conf
kde
kernel
kerneloops.conf
krb5.conf
ldap.conf
ld.so.cache
ld.so.conf
ld.so.conf.d
lftp.conf
libaudit.conf
libuser.conf
localtime
login.defs
logrotate.conf
logrotate.d
logwatch
lvm
mail
mailcap
mail.rc
makedev.d
man.config
mime.types
minicom.users
mke2fs.conf
modprobe.conf
modprobe.d
motd
mtab
mtools.conf
multipath.conf
netconfig
netplug
netplug.d
NetworkManager
networks
nscd.conf
nsswitch.conf
nsswitch.conf.bak
ntp
ntp.conf
obex-data-server
openldap
openvpn
opt
PackageKit
pam.d
pam_pkcs11
pam_smb.conf
pango
passwd
passwd-
pcmcia
pki
pm
pm-utils-hd-apm-restore.conf
PolicyKit
popt.d
portreserve
ppp
prelink.cache
prelink.conf
prelink.conf.d
printcap
profile
profile.d
protocols
pulse
purple
quotagrpadmins
quotatab
rc
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
rc.d
rc.local
rc.sysinit
redhat-release
resolv.conf
rmt
rpc
rpm
rsyslog.conf
rwtab
rwtab.d
samba
sane.d
sasl2
scim
scsi_id.config
securetty
security
selinux
sensors3.conf
services
sestatus.conf
setroubleshoot
setuptool.d
sgml
shadow
shadow-
shells
skel
smartd.conf
smolt
smrsh
sos.conf
sound
ssh
statetab
statetab.d
stunnel
sudoers
sysconfig
sysctl.conf
system-release
system-release-cpe
terminfo
udev
updatedb.conf
virc
vpnc
warnquota.conf
wpa_supplicant
wvdial.conf
X11
xdg
xinetd.d
xml
yp.conf
yum
yum.conf
yum.repos.d


Most of the configuration files for the system lies under /etc.  So please be sure before you edit them, or else take a back-up of it and edit to feel the changes on your system :)
tell2humanlinux@gmail.com

No comments:

Post a Comment