LINUX-VERSION(1)
β¨ LINUX-VERSION(1) β¨
linux-version π lives in the General Commands Manual π, and it's here to help you operate on Linux kernel version strings π¦
π NAME π
linux-version - operate on Linux kernel version strings β¨
πΈ SYNOPSIS πΈ
linux-version compare KERNEL-VER-1 OP KERNEL-VER-2
linux-version sort [--reverse] [KERNEL-VER-1 KERNEL-VER-2 ...]
linux-version list [--paths]
π DESCRIPTION π
okay so linux-version is the bestie you call when you need to work with Linux kernel version strings, the ones you see from uname -r and in file and directory names π§ these version strings do not follow the same rules as Debian package version strings, so please don't compare them like that, and don't treat them as arbitrary strings either π
β compare KERNEL-VER-1 OP KERNEL-VER-2
Compares two version strings, where OP is a binary operator π linux-version gives you success (zero result) if the condition is true, and failure (nonzero result) if it isn't. The valid operators are: lt le eq ne ge gt β¨
π sort [--reverse] [KERNEL-VER-1 KERNEL-VER-2 ...]
Sorts the version strings you give it and prints them from lowest to highest π add --reverse and it flips the order, highest to lowest π₯
If you don't pass any version strings as arguments, it'll read them from standard input instead, one per line π«Ά each one can have some arbitrary text tacked on after a space, and that text gets included in the output too. So for example:
linux-version list --paths | linux-version sort --reverse
will list the installed versions and their corresponding paths, in order from highest version to lowest. main character energy, honestly π
π¦ list [--paths]
Lists the kernel versions installed in the customary location π· if you add --paths, it also shows the corresponding path for each version π
π AUTHOR π
linux-version and this manual page were written by Ben Hutchings as part of the Debian linux-base package π absolute legend behavior, no cap π
Sign-off time, bestie π this page came from the Debian linux-base package, dated 30 March 2011, and it's still giving πβ¨ stay iconic, and read the manual π«Άπ
π¦ where this page comes from
- debian bookworm: linux-base 4.12.1~deb12u1 Β· GPL-2.0-only
- debian trixie: linux-base 4.12.1 Β· GPL-2.0-only
- ubuntu questing: linux-base 4.14ubuntu2 Β· GPL-2.0-only
- ubuntu resolute: linux-base 4.15ubuntu5 Β· GPL-2.0-only
- ubuntu stonking: linux-base 4.17ubuntu1 Β· GPL-2.0-only
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms