Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is now an <code>os</code> module: <a href="http://nodejs.org/api/os.html">Node OS Module Docs</a>. It has a function for getting the platform <a href="http://nodejs.org/api/os.html#os_os_platform"><code>os.platform</code></a></p> <p>The docs don't give return values. So, I've documented some below. Results are for Ubuntu 12.04 64-bit, OS X 10.8.5, Windows 7 64-bit and a Joyent SmartMachine, respectively. Tests conducted on Node 0.10.</p> <h2>Linux</h2> <ul> <li><code>os.type()</code> : <code>'Linux'</code></li> <li><code>os.platform()</code> : <code>'linux'</code></li> <li><code>os.arch()</code> : <code>'x64'</code></li> </ul> <h2>OS X (Mac)</h2> <ul> <li><code>os.type()</code> : <code>'Darwin'</code></li> <li><code>os.platform()</code> : <code>'darwin'</code></li> <li><code>os.arch()</code> : <code>'x64'</code></li> </ul> <h2>Windows</h2> <ul> <li><code>os.type()</code> : <code>'Windows_NT'</code></li> <li><code>os.platform()</code> : <code>'win32'</code></li> <li><code>os.arch()</code> : <code>'x64'</code></li> </ul> <h2>SmartMachine</h2> <ul> <li><code>os.type()</code> : <code>'SunOS'</code></li> <li><code>os.platform()</code> : <code>'sunos'</code></li> <li><code>os.arch()</code> : <code>'ia32'</code></li> </ul> <p>Note: on Windows 7 64-bit node may incorrectly report <code>os.arch()</code> as <code>ia32</code>. This is a documented bug: <a href="https://github.com/joyent/node/issues/2862">os.arch should be the architecture of the OS not of the process</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload