On Mon, Dec 11, 2023 at 04:31:22AM +0100, Stella Ashburne wrote: > Someone on a social media platform stated that there are only two "canonical" > [sic] ways to verify the version of Debian installed on a system. They are: > > uname -a > > /proc/version > > Do you agree with the above statement?
The second one isn't even a command. Neither one of them tells you what version of Debian is installed, even if you fix the second one. All these tell you is which kernel is running. It's completely possible, and supported, to run a Debian system with a custom kernel that you built yourself, in which case the kernel version revealed by these commands tells you nothing about which OS is running on top of that kernel. To see the version of Debian, the correct command is: cat /etc/debian_version This works for any *release* version of Debian. It will not differentiate among various pre-releases, including testing and unstable. For those, you'll need to go deeper. "apt policy" and "cat /etc/apt/sources.list" and "tail -n+1 /etc/apt/sources.list.d/*" would be good starts for that.