title: Find total physical memory on computer, .NET core 2.1, c#, Ubuntu
body: <p>How do I find the total available physical memory on a computer specifically running Ubuntu and .NET core? Most solutions work only on full .NET and the following .NET core code snippet --</p>
  
  <pre><code>ManagementClass mc = new ManagementClass ("Win32_ComputerSystem");
  ManagementObjectCollection moc = mc.GetInstances();
  foreach (ManagementObject item in moc)
      m1 = Convert.ToUInt64(item.Properties["TotalPhysicalMemory"].Value);
  </code></pre>
  
  <p>works properly on Windows but returns 0 on non-Windows systems.</p>