Pages

Sunday, September 4, 2011

Linux File Structure

Linux File Structure :








                  In the Linux file structure files are grouped according to purpose. Ex: commands, data files,documentation. Parts of a Unix directory tree are listed below. All directories are grouped under the root entry "/". That part of the directory tree is left out of the below diagram. See the FSSTND standard

(Filesystem standard).

root - The home directory for the root user
home - Contains the user's home directories along with directories for services
            ftp
            HTTP
            samba
            george
bin - Commands needed during bootup that might be needed by normal users
sbin - Like bin but commands are not intended for normal users. Commands run by LINUX.
proc - This filesystem is not on a disk. It is a virtual filesystem that exists in the kernels
           imagination which is memory.
       1 - A directory with info about process number 1. Each process has a directory below proc.
usr - Contains all commands, libraries, man pages, games and static files for normal operation.
         bin - Almost all user commands. some commands are in /bin or /usr/local/bin.
         sbin - System admin commands not needed on the root filesystem. e.g., most server    
                   programs.
         include - Header files for the C programming language. Should be below /user/lib for
                       consistency.
          lib - Unchanging data files for programs and subsystems
          local - The place for locally installed software and other files.
         man - Manual pages
         info - Info documents
         doc - Documentation
         tmp
         X11R6 - The X windows system files. There is a directory similar to usr below this directory.
         X386 - Like X11R6 but for X11 release 5
boot - Files used by the bootstrap loader, LILO. Kernel images are often kept here.
lib - Shared libraries needed by the programs on the root filesystem
       modules - Loadable kernel modules, especially those needed to boot the system after
                       disasters.
dev - Device files

etc - Configuration files specific to the machine.
         skel - When a home directory is created it is initialized with files from this directory
         sysconfig - Files that configure the linux system for devices.
var - Contains files that change for mail, news, printers log files, man pages, temp files  file
       lib - Files that change while the system is running normally
       local - Variable data for programs installed in /usr/local.
       lock - Lock files. Used by a program to indicate it is using a particular device or file
      log - Log files from programs such as login and syslog which logs all logins and logouts.
      run - Files that contain information about the system that is valid until the system is next
              booted
      spool - Directories for mail, printer spools, news and other spooled work.
      tmp - Temporary files that are large or need to exist for longer than they should in /tmp.
     catman - A cache for man pages that are formatted on demand
mnt - Mount points for temporary mounts by the system administrator.
tmp - Temporary files. Programs running after bootup should use /var/tmp.






Pathname Contents

  • /bin                      Commands needed for minimal system operability
  • /boot                    Kernel and files needed to load the kernel
  • /dev                      Device entries for disks, printers, pseudo-terminals, etc.
  • /etc                      Critical startup and configuration files 
  • /home                  Home directories for users
  • /lib                       Libraries and parts of the C compiler 
  • /media                  Mount points for filesystems on removable media
  • /opt                     Optional application software packages (not yet widely used)
  • /proc                   Information about all running processes
  • /root                    Home directory of the superuser (often just /)
  • /sbin                    Commands for booting, repairing, and recovering the system
  • /tmp                    Temporary files that may disappear between reboots
  • /usr                     Hierarchy of secondary files and commands

                /usr/bin            Most commands and executable files
                /usr/include      Header files for compiling C programs
                /usr/lib             Libraries; also, support files for standard programs
                /usr/local          Local software (software you write or install)
                /usr/local/bin     Local executables
                /usr/local/etc     Local system configuration files and commands
                /usr/local/lib      Local support files
                 /usr/local/sbin    Statically linked local system maintenance commands
                 /usr/local/src      Source code for /usr/local/*
                 /usr/man            On-line manual pages
                 /usr/sbin            Less essential commands for system administration and repair
                 /usr/share          Items that might be common to multiple systems (read-only)
                 /usr/share/man  On-line manual pages
                 /usr/src              Source code for nonlocal software packages (not widely used)



  • /var                      System-specific data and configuration files

                /var/adm         Varies: logs, system setup records, strange administrative bits
               /var/log           Various system log files
              /var/spool       Spooling directories for printers, mail, etc.
              /var/tmp         More temporary space (preserved between reboots)





No comments:

Post a Comment