I am using Ubuntu and I want to read the version of its kernel. I found a file named version in /proc/ that records the version of the current kernel.
If I dont want to read file, is there any other way, like built-in function in C, that I can read the version in C?
Thanks
You can use the uname() system call.
Check the uname function. It gives you a lot of information without the need to parse output of some linux executables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With