Linux File System Hierarchy/Structure and Important filesystem
1. Linux File System Structure
/ : top level root directory. All other directories are below the root directory in filesystem hierarchy. Any directory not mounted in a separate partition is automatically part of root directory volume.
/bin: User command folder. Most of basic commands in here: history, ls, rpm, tar …You should not configure this directory in a separate partition. If you do that, you can not access these utilities in linux rescue mode.
/boot: Boot loader files. Linux kernel and GRUB (Grand Unified Bootloader), Initial RAM disk are here. If you have larger disk (> 8GB), it’s good idea to mount /bot in a seperate partition, This will help you to ensure your Linux boot files remain accessible when you start your computer.
/dev: Device Files. It is including all hardware devices on Linux. If you mount a floppy drive, you may mount /dev/fd0 onto a directory /mnt/floppy.
/etc: Server Configuration, network configuration, service configuration. It’s all basic Linux configuration files, related to passwords, deamons…
/home: User Home Directory. All users are having home folder in here. Example we create one user as “kevin.ngo”. One folder will be created as “/home/kevin.ngo”
/lib: Libraries and kernel. All system libraries and kernel libraries are in here. List program libraries need by a number of different applications as well as Linux kernel. You should not mount this directory in a seperate partition.
/lost+found : Contains orphan files. This directory is not a formal part of Filesystem.
/media: Mount point for media. Example: CDROM, USB Devices…
/mnt: Mount point temp. Mount point for any devices we want to mount to Linux system. Example: new hard disk, usb, CDrom… such as floppy (/mnt/floppy), CD-ROM (/mnt/cdrom), and Zip (/mnt/zip) drives.
/misc : Notes a common mount point for shared NFS directories. This is auto used by Auto-mounter. It’s not formal part of filesystem.
/opt: App software files. It contains software application files. It also contains standard locations for third-party applications such as StarOffice.
/sbin: System binaries. It contains all commands which used by system admin: iptables, fdisk, ifconfig… Don’t mount this directory seperately.
/srv: Data for services. Directory for service files.
/tmp: Temp files. It contains temporary files which can access by any users in Linux. it’s as a dedicated storage location for temporary files, this is good place to download files.
/usr: User utilities and APP. It includes binaries, man pages, libraries for program. This contains many subdirectories. For example, programs associated with OpenOffice.org suite are installed in /usr/bin.
/var: Varible files: log, web root, print spools. On Linux servers, this directory is frequently mounted on a seperate partition.
/root: Home dir for root. It’s a subdirectory of the root (/) directory. Don’t mount this directory separately.
/proc: Virtual filesystem. It includes running process with pid and kernel-related processes. Some of the files in this directory list current resource allocations; for example /proc/interrupts lists interrupt requests (IRQ) ports.
/tftpboot : supports diskless workstations, also known as remote terminals. The diskless workstation mounts this directory from the Linux terminal server. This directory is not formal on filesystem.
2. Important files on Linux System.
– /etc/passwd : encrypted password for system users in Linux. (relates to /etc/shadow)
– /etc/crontab : scheduled shell scripts for automatically.
– /etc/fstab : mount point on Linux.
– /etc/init.d/ : service startup location.
– /etc/grub.conf : GRUB bootloader configuration.
– /etc/inittab : Run level mode configuration.
– /etc/issue : Login banner message.
– /etc/profile : Bash shell in default.
– /etc/sysconfig/network-scripts/ : network configuration
– /etc/X11 : X-window configuration.
– /etc/resolv.conf : dns configuration.
– /etc/hosts : IP to host name configuration for local Linux.
– /usr/sbin : commands for System users.
– /usr/lib : Libraries for Compiled package.
– /usr/share : man files.
– /usr/bin : User executable bash commands.
– /var/log/messages : main log file on Linux.
– /var/www/html : default web root.
Thanks for using IThelpblog.com.