Skip to main content
In this lesson we cover a core skill for any Red Hat Enterprise Linux system administrator: file management. Everything in Linux is represented as a file — configuration files, logs, device nodes, scripts, and user data. If you cannot confidently manage files, you cannot effectively administer a system. This article walks you through the essentials in a logical order:
  • The Linux filesystem hierarchy and what each top-level directory is for.
  • Specifying files by name using absolute and relative paths.
  • Command-line file operations: create, copy, move, delete, and view files.
  • Links: hard links vs symbolic links and when to use each.
  • Archiving with tar: create, list, and extract archives.
  • Finding files quickly with tools like find and locate.
  • Practical command-line exercises for real-world administration and RHCSA preparation.
By the end of this section you should be comfortable navigating and manipulating files and directories — a must for the RHCSA exam and day-to-day system administration.
A dark-themed presentation slide titled "Overview" showing bullet-point learning objectives about Linux file management, including filesystem hierarchy, absolute vs relative paths, command-line file tools, hard/symbolic links, tar archives, and file searching.
Now let’s move into one of the most important foundational topics in Linux: the filesystem hierarchy. Without understanding this structure you end up guessing where things are — configuration files, logs, user data, binaries — which slows troubleshooting and increases the chance of mistakes. Once you understand how everything branches from the root (/) and what each top-level directory is intended for, you’ll know exactly where to look and where to place files as a system administrator. Think of the Linux filesystem like a city map: every type of file has a designated district.
A dark-themed slide titled "The File System Hierarchy" showing the Linux penguin (Tux) on the left mapped with dotted lines to a city-map icon on the right, and file-shaped icons labeled as designated districts below. It visually compares the Linux file system structure to a city map layout.
Common top-level directories such as /bin, /etc, /home, and /tmp act like neighborhoods with specific, predictable purposes.
A dark-themed slide titled "The File System Hierarchy" showing four folder icons labeled /bin, /etc, /home, and /tmp. Each folder has a caption describing its purpose: System Binaries, Configuration, User Files, and Temporary Data.
Key filesystem concepts and important top-level directories
  • / — The root directory is the top of the filesystem tree and is mounted at boot. All other files and directories live under /.
  • /bin — Essential user command binaries required early in boot or in single-user mode (e.g., ls, cp, mv).
  • /sbin — System administration binaries intended for the superuser (examples: fsck, ifconfig on some systems). These may not be in a regular user’s PATH.
  • /lib — Shared libraries used by programs in /bin and /sbin. Kernel modules are in subdirectories such as /lib/modules.
A slide titled "Filesystem Structure – Part 1" showing the root (/) as a node with dotted branches down to three directories: /bin, /sbin, and /lib. The /lib box is labeled for shared libraries and kernel modules.
  • /etc — System and service configuration files (mostly plain-text). Exercise care with sensitive data stored here.
  • /usr — Unix System Resources: application programs, libraries, documentation, and other shareable, mostly read-only data installed by the distribution or package manager.
  • /opt — Optional add-on or third-party software that the distribution’s package manager typically does not manage.
A diagram titled "Filesystem Structure – Part 2" showing the root directory (/) branching to three subdirectories: /etc, /usr, and /opt. The /opt box is labeled for optional/third-party applications.
Summary table — common top-level directories More directory details and operational notes
  • /boot contains static files needed by the bootloader (GRUB2) and kernel images. Don’t delete kernels unless you know what you’re doing.
  • /root is the root account’s home directory so the superuser can work even if other filesystems (like /home) are not mounted.
  • /home is typically where regular users have their personal files and settings; it might be on a separate partition or remote mount.
  • /mnt is the conventional place for temporary mounts. Administrators create subdirectories here and mount devices with mount and unmount with umount.
  • /srv holds data for services (for example, web site files).
  • /var contains files that change at runtime, such as logs (/var/log), mail spools, caches, and temporary application data.
A slide diagram titled "Filesystem Structure – Part 4" showing the root directory (/) branching to three subdirectories: /mnt, /srv, and /var, with /var labeled "Variable runtime data."
  • /tmp holds temporary files created by programs. The system or administrators may remove files here on reboot or after a period of inactivity — do not rely on /tmp for persistent storage.
  • /dev contains device nodes representing hardware components. Programs interact with hardware by reading and writing these special files.
  • /proc is a virtual filesystem that exposes kernel and process state as files. It provides a live view of kernel data structures and running processes.
Files under /etc, /bin, /sbin, and /lib are critical to system operation. Editing or removing them incorrectly can make the system unbootable. Always back up configuration files before making changes.
Normal files vs directories — a clarified distinction
  • A file stores data: text, configuration settings, binaries, scripts, or logs — anything you open, edit, or execute is usually a file.
  • A directory is a special file that contains entries mapping names to inodes (metadata and disk locations). Directories function as containers that organize files and subdirectories, providing hierarchical paths across the filesystem.
A slide titled "Normal Files vs Directories" with two colored panels comparing "File" and "Directory." The File panel says it stores data (text, scripts, programs, logs) and is used to read/write/execute, while the Directory panel says it organizes files, contains files and other directories, and structures the filesystem.
Tip: Use ls -la to inspect directory contents and metadata, and stat <file> to view inode and timestamp information. These commands help you understand whether an entry is a file, a directory, or a special device node.
Next steps
  • Practice navigating the filesystem using absolute paths (starting with /) and relative paths (relative to your current working directory).
  • Learn the basic file-management commands (touch, mkdir, cp, mv, rm, cat, less) and their common options.
  • Study links (ln for hard links and ln -s for symbolic links) to understand shared references to data.
  • Master tar for archiving and compression tasks: creating archives (tar -cvf), listing (tar -tvf), and extracting (tar -xvf).
  • Learn find, locate, and updatedb for efficient file discovery.
These skills are foundational for system administration and for preparation toward the RHCSA certification.

Watch Video