Linux File System and File Paths

For any person, who does not have well knowledge of Linux Operating System and Linux File System, dealing with the files and their location, their use may be horrible, and a newbie may really mess up. In this tutorial, we can discuss about the basic directories in Linux and important files paths in your Linux server. The following are the basic directories and their functionality in a Linux server

/root/  — The home directory of the root, the superuser

/boot/ —Contains the kernel and other files used during system startup.

/bin/ — Used to store user commands. The directory /usr/bin/ also stores user commands.

/sbin/ — Location of many system commands, such as shutdown. The directory /usr/sbin/ also contains many system commands.

/dev/ — Stores device files.

/mnt/ — This directory typically contains the mount points for file systems mounted after the system is booted.

/media/ — This directory contains the mount points for removable media, such as diskettes, CD-ROMs, and USB flash drives.

/usr/ — Contains files and directories directly relating to users of the system, such as programs and supporting library files.

/etc/ — Contains configuration files and directories.

/lib/ — Contains many device modules and library files used by programs in /bin/ and /sbin/. The directory /usr/lib/ contains library files for user applications

/var/ — For variables (or constantly changing) files, such as log files and the printer spool.

/home/ — Default location of user home directories

/proc/ — A virtual file system (not actually stored on the disk) that contains system information used by certain programs

/tmp/ — The temporary directory for users and programs. /tmp/ allows all users on a system to read and write access

/opt/ — Directory where optional files and programs are stored. This directory is used mainly by third-party developers for easy installation and uninstallation of their software packages.

/initrd/ — A directory that is used to mount the initrd.img image file and load needed device modules during bootup.

/run/- This directory is the only clean solution for the early-runtime-dir problem.

/sys/ — Modern Linux distributions include a /sys directory as a virtual file system, which stores and allows modification of the devices connected to the system.

 

Important file, their location, and their Usability

Everything in the Linux environment exists in files.  It makes sense for users to become familiar with some of the more important Linux system files.  Some of these are configuration files, others are devices which Linux makes available through files and some are executable programs.  The following are the important files and their locations on your Linux system.

 

/boot/vmlinuz/ – the typical location and name of the Linux kernel.

/dev/had/ – first IDE hard drive

/dev/null/ – used when you want to send output into oblivion

/etc/rc/ — Scripts or directories of scripts to run at startup or when changing the run level.

/etc/passwd/ —The user database, with fields giving the username, real name, home directory, and other information about each user.

/etc/shadow/ — It is an encrypted file that holds user passwords.

/etc/fdprm/ — Floppy disk parameter table. Describes what different floppy disk formats look like.

/etc/fstab/ — Information of Disk Drive and their mount point.

/etc/group/ — Similar to /etc/passwd, but describes groups instead of users.

/etc/inittab/ ­— Configuration file for init.

/etc/issue/ — Output by getty before the login prompt. Usually contains a short description or welcoming message to the system. The contents are up to the system administrator.

/etc/modules.conf/ — Configuration files for system modules.

/etc/motd/ — motd stands for Message Of The Day, The Message users gets upon login.

/etc/mtab/ — Currently mounted blocks information.

/etc/passwd/ — Contains password of system users in a shadow file, a security implementation.

/etc/printcap/ — Printer Information

/etc/profile/ — Bash shell defaults

/etc/profile.d/ — Application script, executed after login.

/etc/rc.d/ — Information about run level specific script.

/etc/rc.d/init.d/ — Run Level Initialization Script.

/etc/resolv.conf/ — Domain Name Servers (DNS) being used by System.

/etc/securetty/ — Terminal List, where root login is possible.

/etc/skel/ — Script that populates new user home directory.

/etc/termcap/ — An ASCII file that defines the behavior of Terminal, console and printers.

/etc/X11/ — Configuration files of X-window System.

/usr/bin/ — Normal user executable commands.

/usr/bin/perl — Path to Perl.

/usr/bin/Sendmail – Path to Sendmail.

/usr/bin/python – path to python.

/usr/bin/X11/ — Binaries of X windows System.

/usr/include/ — Contains include files used by ‘c‘ program.

/usr/share/ — Shared directories of man files, info files, etc.

/usr/lib/ — Library files which are required during program compilation.

/usr/sbin/ — Commands for Super User, for System Administration.

/proc/cpuinfo/ — CPU Information

/proc/filesystems/ — File-system Information being used currently.

/proc/interrupts/ — Information about the current interrupts being utilized currently.

/proc/ioports/ — Contains all the Input/output addresses used by devices on the server.

/proc/meminfo/ — Memory Usages Information.

/proc/modules/ — Currently using kernel module.

/proc/mount/ — Mounted File-system Information.

/proc/stat/ ­­— Detailed Statistics of the current System.

/proc/swaps/ — Swap File Information.

/version/ — Linux Version Information.

/var/log/lastlog/ — log of last boot process.

/var/log/messages/ — log of messages produced by syslog daemon at boot.

/var/log/wtmp/ — list login time and duration of each user on the system currently.

 

If you need any further help, please do reach our support department.

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)