Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

How it works...

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content