Skip to content
zdkPublic

About

Command to fetch OS Distro.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

distrowat

Fetch distro info ¯\_(ツ)_/¯

Works on Linux (Ubuntu, Debian, Fedora, RHEL family, Alpine, Arch family, and more) and macOS.

Install

curl:

curl -fsSL https://raw.githubusercontent.com/zdk/distrowat/refs/heads/main/install.sh | sudo bash

Homebrew:

brew tap zdk/tools
brew install distrowat

Debian/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.deb

Usage

distrowat [--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"
}

Release and EOL dates

all looks up dates in this order:

  1. endoflife.date, if curl is installed. Answers are cached for a day in ~/.cache/distrowat.
  2. An older cached answer, if the network is down.
  3. /usr/share/distro-info/<id>.csv, from the distro-info-data package (Ubuntu and Debian only).

If all of these fail, the dates show Unknown.

Set NO_COLOR=1 to turn off colors.

About

Command to fetch OS Distro.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages