os


1. Get Current Working Directory

const os = require('os');

console.log(os.cwd());

2. Get Temporary Directory

const os = require('os');

console.log(os.tmpdir());

3. Get Home Directory

const os = require('os');

console.log(os.homedir());

4. Get Username

const os = require('os');

console.log(os.userInfo().username);

5. Get Platform

6. Get Architecture

7. Get Hostname

8. Get Release

9. Get CPU Information (Physical)

10. Get CPU Information (Logical)

11. Get Free Memory

12. Get Total Memory

13. Get Network Interfaces

14. Restart the System

15. Shutdown the System

16. Get System Uptime

17. Get Load Average

18. Check If Process Is Running

19. Change Process Priority

20. Get File System Information

21. Check File Access

22. Read File

23. Write File

24. Rename File

25. Delete File

26. Create Directory

27. Delete Directory

28. Change Directory

29. List Files in Directory

30. Check If Path Exists

31. Get File Size

32. Convert Path to Absolute Path

33. Normalize Path

34. Resolve Path

35. Get Temporary File Name

36. Create Temporary File