Click here to Skip to main content
15,913,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
Can anyone plz tell me how to find the vesrion of Red Hat Linux from c++ or if there is any fucntion to get the version number.
Thanks
Dev
Posted

The command uname() should do it.

manpage uname(2)
 
Share this answer
 
You could get this version information from the environment variables.
You can use the getenv() function to the environment variable of you choice.
I'm not sure which variable gives you this information on Red Hat, but you could check that by issuing the env or set commands.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900