[Tips] Get the OS version of Linux
There are many variants of Unix/Linux systems, such as Ubuntu, Redhat, and even some versions in Windows system such as MinGW/Msys and Cygwin.
Today I am going to introduce a way to get such information, which is simple, run the following command
|
|
Running this command in Ubuntu and Redhat will yield GNU/Linux, while running it under MinGW/Msys yields Msys. If you run
|
|
will give you kernel release.
Actually, the command uname can output more information than this, if you add the option ‘-a’, including kernel name, hostname, and processor type. Check the command’s manpage for more information.
Other methods
In addition to uname, one can also use the following command to output OS information:
|
|
Happy computing. 😄
Last modified on 2019-11-02