/var
The directory for data that changes while the system runs, such as logs, caches, spools and package databases.
In more detail
Unlike /etc, which is edited occasionally, /var grows and shrinks constantly: /var/log holds logs and /var/cache holds caches. When a disk fills up, /var is often where the space went. Its contents persist across reboots, unlike /tmp on many systems.
Related terms
- Filesystem Hierarchy Standard — The convention that says what each top-level Linux directory, such as /etc, /var and /home, is for.
- journald — The systemd logging service that collects messages from the kernel, services and programs into a structured, indexed journal.
- block exhaustion — A filesystem running out of free data blocks, so it cannot store more bytes even though it may have inodes left.
Taught in
- Choose The Right Workload Resource — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Sidecars And Init Containers — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Container Logs — Certified Kubernetes Application Developer (CKAD) Exam Prep
- The Metadata Endpoint And The Kubelet's Front Door — Certified Kubernetes Security Specialist (CKS) Exam Prep
- kube-bench: Ten Failures On A Fresh Cluster — Certified Kubernetes Security Specialist (CKS) Exam Prep
- ServiceAccounts: Take Back The Key — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Seccomp: Which Syscalls A Container May Make — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Secrets In Use: Leaks Through Env, Specs And Images — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Static Analysis: kubesec And KubeLinter — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Immutable Containers: Read-Only At Runtime — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Detection Review: Which Signal Catches It? — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Mock Exam: Seventeen Security Tasks Against The Clock — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Not The Admin Certificate: RBAC And ServiceAccounts — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Running, Green And Still Broken: Debugging Applications — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Slow, Or Broken? Metrics, Logs And Traces — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- The Filesystem Hierarchy — Linux Fundamentals & Systems Administration
- Running Out Of Space: df, du And Inodes — Linux Fundamentals & Systems Administration
- Logins, su, sudo And SSH Between Hosts — Red Hat Certified System Administrator (EX200) Exam Prep
- Logs, The Journal, And Keeping It Across Reboots — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Modes, And Why setenforce Is Not Enough — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Contexts: Labels, restorecon And Rules That Last — Red Hat Certified System Administrator (EX200) Exam Prep
- SELinux Ports And Booleans: The Other Two Refusals — Red Hat Certified System Administrator (EX200) Exam Prep
- Mock Exam, Part 2: Real Machines And The Ten Costly Mistakes — Red Hat Certified System Administrator (EX200) Exam Prep
- Five Nodes Before Lunch: Building A Swarm — Docker Certified Associate (DCA) Exam Prep
- One File, Five Services: Stacks From Compose Files — Docker Certified Associate (DCA) Exam Prep
- Twelve Lines, Ten Warnings: Dockerfile Instructions And hadolint — Docker Certified Associate (DCA) Exam Prep
- One Edited File, Six Rebuilt Steps: Layers, Cache And Flat Images — Docker Certified Associate (DCA) Exam Prep
- Our Own Registry: Deploy, Push, Pull, Search And Delete — Docker Certified Associate (DCA) Exam Prep
- One Comma, No Engine: Installing And Configuring Docker Engine — Docker Certified Associate (DCA) Exam Prep
- Forty Gigabytes Of One Log: Logging Drivers And Their Options — Docker Certified Associate (DCA) Exam Prep
- Four Questions From The Auditor: Swarm Security, Autolock And Content Trust — Docker Certified Associate (DCA) Exam Prep
- The Pager Goes Off At 2 A.M.: A Three-Question Triage — CompTIA Linux+ (XK0-006) Exam Prep
- The App In /bin That Vanished: The FHS, Distributions And Licences — CompTIA Linux+ (XK0-006) Exam Prep
- Which RAID, Which File System? Disks That Fail And Inodes That Run Out — CompTIA Linux+ (XK0-006) Exam Prep
- Friday's Backup, Monday's Restore: Incrementals, Images And Compressed Logs — CompTIA Linux+ (XK0-006) Exam Prep
- Starters, Leavers And A Service Account: Accounts On Two Families — CompTIA Linux+ (XK0-006) Exam Prep
- The Upgrade That Broke Nginx: Packages, Repositories And Pins On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- Clocks, Names, Addresses And Pages: The Services Every Depot Runs — CompTIA Linux+ (XK0-006) Exam Prep
- Who Wrote That Sudoers File? The Journal, rsyslog, logrotate And auditd — CompTIA Linux+ (XK0-006) Exam Prep
- The Pager Command That Opened A Root Shell: sudo, su And Least Privilege — CompTIA Linux+ (XK0-006) Exam Prep
- The Cleanup That Emptied The Wrong Directory: Shell Scripts Under Exam Conditions — CompTIA Linux+ (XK0-006) Exam Prep
- When awk Runs Out: Python Data Types, Modules And Virtual Environments For Admins — CompTIA Linux+ (XK0-006) Exam Prep
- The Customers Noticed First: SLAs, SLOs, Alerts, SNMP And Log Aggregation — CompTIA Linux+ (XK0-006) Exam Prep
- Forbidden, With Perfect Permissions: Paths, ACL Masks And SELinux Denials — CompTIA Linux+ (XK0-006) Exam Prep
- Patched On Paper: Missing Updates, Broken Chains, Old Protocols And Open Doors — CompTIA Linux+ (XK0-006) Exam Prep
- Virtual Machines With libvirt: XML, virsh And Autostart — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Containers: Run, Publish, Persist, And Configure The Engine — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- LVM End To End: Pools, Volumes And Online Growth — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Storage Performance: Busy, Slow, Or Both — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Services You Write: Units, Drop-Ins And The Reload — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Constraints: Limits, Control Groups And Listeners — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Disk Full At Three In The Morning — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Accounts On Ubuntu: Skeletons, Groups And Offboarding — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- LDAP Users Through SSSD — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Disk Layout And The Boot Loader — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
References
Certification courses
- CKAD course and practice exam: Certified Kubernetes Application Developer
- CKS course and practice exam: Certified Kubernetes Security Specialist
- KCNA course and practice exam: Kubernetes and Cloud Native Associate
- RHCSA course and practice exam: Red Hat Certified System Administrator (EX200)
- DCA course and practice exam: Docker Certified Associate
- CompTIA Linux+ course and practice exam: XK0-006
- LFCS course and practice exam: Linux Foundation Certified System Administrator
- LPIC-1 course and practice exam: Linux Administrator (101-500 and 102-500)