If you're using a Mac, the command for version is sw_vers. This will give you detailed information about your Mac's operating system, including the version number.
For Windows, the command is ver. This will display your Windows version, service pack level and OS configuration.
Linux users can use the lsb_release -a command to find out their distribution, release and codename.