How do I check if I have Cyanogenmod on my phone? Is it possible to check using shell whether or not Cyanogenmod is installed on a device?

In other words, something like uname -a (which tells the system Linux version and architecture).

Can the version be determined as well?
Another way is to simply go to Settings&rarr;About phone, where you should see (depending on your CyanogenMod version) an item "CyanogenMod updates", and (with all CM versions) "CyanogenMod-Version":