Linux File Hierarchy Structure
/ (Root Directory):
- The top-level directory, representing the root of the file system hierarchy.
/bin (Binary Binaries):
- Essential command binaries that are required for system boot and recovery. These binaries are available to all users.
/boot (Bootable Kernel Images):
- Contains files needed for the system boot process, including the kernel, initial ramdisk, and bootloader configurations.
/dev (Device Files):
- Contains device files that represent and allow communication with hardware devices.
/etc (System Configuration Files):
- Configuration files for system-wide settings and application-specific configurations.
/home (User Home Directories):
- Home directories for regular users.
/lib (Libraries):
- Essential shared libraries needed for system boot and operation.
/media (Removable Media Mount Points):
- Mount points for removable media such as USB drives and optical disks.
/mnt (Temporary Mount Points):
- Mount points for temporary filesystems.
/opt (Optional Software Packages):
- Reserved for the installation of additional software packages that are not part of the default system installation.
/proc (Process Information):
- A virtual filesystem that provides information about running processes and system configuration.
/root (Root Home Directory):
- The home directory for the root user.
/run (Runtime Data):
- Runtime variable data such as system and process IDs, sockets, and other temporary data.
/sbin (System Binaries):
- Essential system binaries that are typically used by the root user.
/srv (Service Data):
- Data for services provided by the system, such as websites or FTP.
/sys (Sysfs Virtual Filesystem):
- A virtual filesystem that exposes information about devices and kernel parameters.
/tmp (Temporary Files):
- A directory for temporary files that are typically cleared on system reboot.
/usr (User Binaries and Libraries):
- Secondary hierarchy for user programs, libraries, documentation, and binaries.
/var (Variable Data):
- Variable files such as logs, spool files, and temporary files that may change dynamically during the operation of the system.
Basic Linux Commands
pwd : Display the current working directory.
mkdir : Create a new directory.
ls: List files and directories.
cd : Change the current working directory.
rmdir : Remove an empty directory.
touch: Create an empty file or update access/modification times.
rm: Remove files or directories
echo: Print a message to the terminal.
cp: Copy files or directories.
mv: Move or rename files or directories.
cat: Display the content of a file.
man: Display the manual or help for a command.
These are basic commands that are fundamental for interacting with the file system and managing essential tasks on a Linux system.