Most Common and Important Files and Directories
August 9th, 2024 2:03 PM Mr. Q Categories: Command
Here’s a table categorizing common and important files and directories by their group:
System and Configuration Files
File/Directory | Description |
---|---|
/etc/passwd | Contains user account information, such as usernames and user IDs. |
/etc/shadow | Stores hashed user passwords and password expiration information. |
/etc/group | Contains group account information, including group names and group IDs. |
/etc/fstab | Defines filesystems and mount points for the system’s storage devices. |
/etc/hosts | Maps hostnames to IP addresses for local resolution. |
/etc/hostname | Contains the system’s hostname. |
/etc/network/interfaces (or /etc/netplan/*.yaml ) | Configuration for network interfaces. |
/etc/sudoers | Defines user privileges for running commands with sudo . |
/etc/crontab | System-wide cron job schedule. |
/var/log/syslog | General system log messages. |
/var/log/auth.log | Authentication logs, including successful and failed login attempts. |
System Directories
Directory | Description |
---|---|
/ | The top-level directory that contains all other directories and files on the system. |
/bin | Essential user binaries and commands (e.g., ls , cp ). |
/sbin | System binaries and commands used for system maintenance (e.g., ifconfig , reboot ). |
/usr/bin | Non-essential user binaries and commands (e.g., vim , python ). |
/usr/sbin | Non-essential system binaries and commands (e.g., apache2 , sshd ). |
/lib | Essential shared libraries and kernel modules. |
/usr/lib | Non-essential shared libraries and modules. |
/home | User home directories, where personal files and settings are stored. |
/root | Home directory for the root user. |
/tmp | Temporary files used by the system and applications. |
/var | Variable data files, including logs, caches, and spools. |
/dev | Device files representing hardware and peripherals. |
/proc | Virtual filesystem providing information about system processes and kernel parameters. |
/sys | Virtual filesystem for kernel and system information, similar to /proc . |
Package Management
File/Directory | Description |
---|---|
/etc/apt/sources.list (for Debian-based systems) | Lists repository sources for the apt package manager. |
/etc/yum.repos.d/ (for Red Hat-based systems) | Directory containing repository definitions for the yum package manager. |
This organization helps you quickly locate and understand the purpose of important files and directories in a Linux system.