Remix.run Logo
yjftsjthsd-h 4 hours ago

> Protip, if you have access to the computer: `lsb_release -a` should list both release and codename. This command is not specific to Ubuntu.

I typically prefer

  cat /etc/os-release
which seems to be a little more portable / likely to work out of the box on many distros.
cesarb 3 hours ago | parent [-]

That's only if the distro is recent enough; sooner or later, you'll encounter a box running a distro version from before /etc/os-release became the standard, and you'll have to look for the older distro-specific files like /etc/debian_version.

Denvercoder9 10 minutes ago | parent [-]

> you'll encounter a box running a distro version from before /etc/os-release became the standard

Do those boxes really still exist? Debian, which isn't really known to be the pinacle of bleeding edge, has had /etc/os-release since Debian 7, released in May 2013. RHEL 7, the oldest Red Hat still in extended support, also has it.