How to know which linux distribution that node is running on?

34 views
Skip to first unread message

kuno

unread,
Jan 10, 2013, 10:20:02 PM1/10/13
to nod...@googlegroups.com
I want to know which linux distribution that my node app is running.

I saw there are some functions in os module that can tell something about that. For instance, you probably can guest the distribution based on the return value of os.release();

'x.x.x-xx-generic'  -> ubuntu
'x.x.x-xx.x.x.EL.wh1' -> Redhat

But is there more straightforward to tell that?

-thans

--kuno

Roger WANG

unread,
Jan 11, 2013, 12:34:44 AM1/11/13
to kuno, nod...@googlegroups.com
You can try to read it from the output of `lsb_release -a`

--
Roger WANG Intel Open Source Technology Center

https://github.com/rogerwang/node-webkit
node-webkit: Call all Node.js modules directly from DOM and enable
a new way of writing applications with all Web technologies.

Eric Mill

unread,
Jan 11, 2013, 12:15:14 PM1/11/13
to nod...@googlegroups.com, kuno
Or `uname -a`. Either way, the solution is to run this as a system command (through Node), not through a specific Node function.



--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply all
Reply to author
Forward
0 new messages