Fetch distro info ¯\_(ツ)_/¯
Works on Linux (Ubuntu, Debian, Fedora, RHEL family, Alpine, Arch family, and more) and macOS.
curl:
curl -fsSL https://raw.githubusercontent.com/zdk/distrowat/refs/heads/main/install.sh | sudo bashHomebrew:
brew tap zdk/tools
brew install distrowatDebian/Ubuntu package:
curl -LO https://github.com/zdk/distrowat/releases/download/v0.9.1/distrowat_0.9.1_all.deb
sudo dpkg -i distrowat_0.9.1_all.debdistrowat [--plain|--json] {name|version|id|pretty|codename|all}
Show everything:
$ distrowat all
╔════════════════════════════╗
║ System Information ║
╠════════════════════════════╣
║ Distribution: Ubuntu ║
║ Version: 25.04 ║
║ ID: ubuntu ║
║ Pretty Name: Ubuntu 25.04 ║
║ Codename: plucky ║
╟────────────────────────────╢
║ Release Date: 2025-04-17 ║
║ End of Life: 2026-01-15 ║
╚════════════════════════════╝
Get one field, for use in scripts:
$ distrowat -p codename
plucky
Get JSON:
$ distrowat --json all
{
"name": "Ubuntu",
"version": "25.04",
"id": "ubuntu",
"pretty": "Ubuntu 25.04",
"codename": "plucky",
"release_date": "2025-04-17",
"end_of_life": "2026-01-15"
}
all looks up dates in this order:
- endoflife.date, if
curlis installed. Answers are cached for a day in~/.cache/distrowat. - An older cached answer, if the network is down.
/usr/share/distro-info/<id>.csv, from thedistro-info-datapackage (Ubuntu and Debian only).
If all of these fail, the dates show Unknown.
Set NO_COLOR=1 to turn off colors.