Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

Start a Blog

Develop Your Skill

Develop Your Skill



Develop Your Skill

 :) Latest Topic
general knowledge
ASP.NET
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
 AngularJS
 :) Hot Jobs
 
 :) Latest Articles


  

 
Helmet Star


Node.js OS Complete Reference
Question Posted on 22 May 2025

Home >> Tutorial >> Node.js Tutorial >> Node.js OS Complete Reference




Node.js OS Complete Reference

Node.js OS Complete Reference


When we say about OS complete reference, Node.js OS module provides information about the computer operating system.

Below example will helps you to get the os.version() method in Node.js:-


// Import the os module
const os = require("os");
let osVersion = os.version();
console.log("OS Version:", osVersion);


And output of above code be should like this:-


OS Version: Windows 10 Enterprise


Below are the complete list of OS are listed below:-
0
0

1Node.js os.EOLWell this is mainly used to get end-of-line characters or markers as specified by the operating system.
2Node.js os.arch() MethodWell this is used to get the CPU architecture of the computer for which the current node.js is compiled.
3Node.js os.cpus() MethodWell this is used to get information about each of logical CPU core of the computer.
4Node.js os.endianness() MethodWell this is used to get endianness of the CPU of the computer for which the node.js is compiled.
5Node.js os.freemem() MethodWell this is used to get the amount of free system memory.
6Node.js os.getPriority() MethodWell this is used to get the scheduling priority of the process specified by pid.
7Node.js os.homedir() MethodWell this is used to get path of the home directory for the current user.
8Node.js os.hostname() MethodWell this is used to get hostname of the operating system.
9Node.js os.loadavg() MethodWell this is used to get the load average.
10Node.js os.networkInterfaces() MethodThis is used to get information about the network interfaces of the computer.
11Node.js os.platform() MethodWell this is used to get the Operating system platform.
12Node.js os.release() MethodWell this is used to get the Operating system release.
13Node.js os.setPriority() MethodWell this is used to set the scheduling priority of the process specified by pid and priority.
14Node.js os.tmpdir() MethodWell this is used to get path of default directory for temporary files of the operating system.
15Node.js os.totalmem() MethodWell this is used to get the amount of total system memory in bytes.
16Node.js os.type() MethodWell this is used to get the Operating system name.
17Node.js os.uptime() MethodWell this is used to get system uptime in seconds.
18Node.js os.userInfo() MethodWell this is used to get the information of the currently effective user.
19Node.js os.version() MethodWell the os. version() method is used to identify the version of the kernel of the Operating System.


 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Node.js File Structure
Parts of Node.js
Install Node.js Linux
Node.js First Example
Node.js Globals






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |