On Linux, everything is a file: configurations, devices, processes. To administer a system, you need to know where things are, how to move to them and how to designate a file without ambiguity. This block teaches you to read the standard tree, to navigate with confidence and to use the right paths.
Why this block exists
A beginner often spends ages looking for a configuration file or getting lost between /etc, /var and /usr. Most administration mistakes come from a misunderstood path or a wrong target directory.
This block lays three essential foundations:
- the FHS tree (Filesystem Hierarchy Standard) that organises every Linux system;
- the navigation commands (
cd,ls,pwd) to move around efficiently; - the absolute path / relative path distinction, essential for scripts and maintenance.
The recommended path
The four guides below follow the order in which the skills build on each other: the map of the system first, then the moves that act on it, the paths that designate a file, and finally the links that give it several names.
1. Understand the map of the system
The guide to the Linux directory tree (FHS) explains what /etc, /var, /usr, /home and the other top-level directories contain: it is the map every following guide relies on, and the reason a configuration file is always looked for in the same place.
2. Move around and manage files
Navigate and manage files gathers the everyday commands: cd, ls, cp, mv, rm and mkdir. They are the ones that act on the directory tree, and rm in particular does not forgive a wrong target.
3. Master paths
The guide to absolute and relative paths shows the difference between /full/path and relative/path, and when to use each. A script that works in one directory and breaks in another nearly always suffers from a badly chosen relative path.
4. Give a file several names
The same file can carry several names, or be reached through a shortcut that points elsewhere. The two mechanisms look alike in use and have nothing in common internally, which explains a few costly traps.
The guide to hard and symbolic links teaches you to create a link with ln, tell the two kinds apart by their inode, repair a broken link and avoid the rm that empties the target instead of the link.
Key points
- The FHS tree is universal:
/etcfor configuration,/varfor variable data,/homefor users. pwdshows your position,cdmoves you,lslists the contents: these are your three navigation commands.- An absolute path starts with
/and works everywhere. A relative path depends on the current directory. - Always use absolute paths in scripts and configuration files.
- A file is an inode, not a name: several names can designate it, and
ls -lishows it.