VOOZH about

URL: https://www.geeksforgeeks.org/node-js/node-js-process-execpath-property/

⇱ Node.js process.execPath Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Node.js process.execPath Property

Last Updated : 28 Apr, 2025

The process.execPath property is an inbuilt application programming interface of the process module which is used to get the absolute pathname of the node.js executable which started the node.js process.
Syntax: 
 

process.execPath


Return Value: This property returns a string signifies the absolute path of the node.js executable which started the node.js process.
Below examples illustrate the use of process.execPath property in Node.js:
Example 1: 
 

Output: 
 

C:\Program Files\nodejs\node.exe


Example 2: 
 

Output: 
 

C:\Program Files\nodejs\node.exe
[ 'C:', 'Program Files', 'nodejs', 'node.exe' ]


Note: The above program will compile and run by using the node filename.js command.
Reference: https://nodejs.org/api/process.html#process_process_execpath
 

Comment

Explore