IN LINUX, YOU CAN USE THE COMMAND UNAME TO HELP YOU IDENTIFY THE NAME, VERSION AND OTHER DETAILS ABOUT THE CURRENT MACHINE AS WELL AS THE OPERATING SYSTEM RUNNING ON IT
uname
When you type uname without A parameter, it will only show the name of your operating system
$ uname
Linux
UNAME -O
Uname -O DISPLAYS THE operating system you are running.
$ uname -o
GNU/Linux
uname -n
uname -n displays the hostname of your machine you can also use hostname as your command
$ uname -n
myserver
lsb_release -a
For Ubuntu use lsb_release -a to find the ubuntu version