title: How to get Linux distribution name and version?
body: <p>In Windows I read the registry key <code>SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName</code> to get the full name and version of the OS.</p>
  
  <p>But in Linux, the code</p>
  
  <pre><code>struct utsname ver;
  uname(&amp;ver);
  retVal = ver.sysname;
  </code></pre>
  
  <p>returns the string <code>linux</code>, not <code>Ubuntu 9.04</code>.</p>
  
  <p>How can I get the Linux distribution name and version?</p>