/etc/os-release
A small text file of name=value lines that tells programs and people which distribution and version a Linux machine runs.
In more detail
Reading it with cat /etc/os-release shows fields such as the name, the version number and the family a distribution is like. Scripts and runbooks use it to choose the right package commands. Check it before following instructions written for another distribution.
Example
The course prints NAME=Example VERSION=1 CHANNEL=stable to model the fields a release description needs.Related terms
- Linux distribution — A complete operating system built around the Linux kernel, such as Debian, Ubuntu or Alpine Linux.
- /etc — The directory that holds a Linux system's configuration files.
- runbook — A written, step-by-step procedure for a routine operation or for responding to a known kind of incident.
Taught in
- What A Distribution Actually Is — Linux Fundamentals & Systems Administration
- The App In /bin That Vanished: The FHS, Distributions And Licences — CompTIA Linux+ (XK0-006) Exam Prep
- Who Wrote That Sudoers File? The Journal, rsyslog, logrotate And auditd — CompTIA Linux+ (XK0-006) Exam Prep
- What Changed Last Night? Integrity, Scans, Benchmarks And Secure Deletion — 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