December 2018
Beginner
826 pages
22h 54m
English
When you are querying these files, you are asking the OS what version it thinks it is.
This is useful in everything from security to writing scripts. Not only do you want to know when the version of an OS you're running is insecure, you might also want to add a sanity check to the top of any scripts, to ensure they're only run on systems they're designed for, that is, you can write a script for CentOS systems, and step one can be to "check we're actually being executed on a CentOS system."
uname (Unix name) is more interesting, because instead of querying files for the OS version, what we were actually doing was querying the running kernel for its information.
uname uses the uname system call (confused yet?), which is not ...