uname, of course, gives the kernel version, but if you want to find out the version of the distribution, you can use lsb_release -ait if it is available (note the comment by Roman Cheplyaka).
local f = io.popen("lsb_release -a")
local s = f:read("*a")
f:close()
--
The stream is the same as in the Windows version.
source
share