🖥️ Node.js OS Module
Last Updated: 26th October 2025
- The os module in Node.js provides operating system-related utility methods and properties.
- You can use it to get information about the system your Node.js app is running on.
Hinglish Tip 🗣: Socho os module ek “system info tool” hai jo bata sakta hai RAM, CPU, OS type aur username jaise details programmatically.
✏ Importing OS Module
// CommonJS
const os = require("os");
// ES6 Module
import os from "os";
Common Methods & Properties
💡 Quick Practice
- Print your OS platform, type, and architecture.
- Display the total and free memory.
- Log all network interfaces and hostname.
- Check how long the system has been running.
