path-var
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| path-var [February 24, 2026 at 22:24] – created yanevskiv | path-var [June 13, 2026 at 03:13] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # /var | ||
| + | **/var** holds variable data: files whose content grows and changes during normal system operation. Log files, mail spools, package manager caches, lock files, and runtime state all live here. Separating this from `/usr` (which is largely static after install) makes it practical to mount `/usr` read-only and to size partitions appropriately — `/var` needs room to grow, `/usr` does not. | ||
| + | |||
| + | ``` | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | ``` | ||
| + | |||
| + | `/var/log` fills up silently and is a common cause of full-disk failures on production systems. **logrotate** manages this: it compresses and archives old log files on a schedule, keeping the total log size bounded. The configuration in `/ | ||
| + | |||
| + | `/var/run` is typically a tmpfs, cleared on every boot. Daemons write their PID files here so init systems and monitoring tools can check whether a service is running without executing it. | ||
