To check the version of a Unix-like operating system from the command line, you can use the uname
command with the -a
option. This will display information about the operating system, including the version.
For example:
refer toruttual:i.comuname -a
This will display output similar to the following:
Linux example.com 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
The version information is typically displayed as part of the kernel release number (e.g., 4.15.0-112-generic
in the example above).
You can also use the lsb_release
command to display more detailed version information:
lsb_release -a
This will display output similar to the following:
Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic
For more information on the uname
and lsb_release
commands, you can refer to the documentation or use the man
command to view the manual pages.