How to Install PM2 in Ubuntu 24.10

To install PM2 on Ubuntu 24.10, follow these simple steps:

Step 1 : Use npm to install PM2 globally:

Step 2 : Run the following command to configure PM2 to start on system boot:

Step 3 : Create a app.js file with the following example code:

Step 4 : Start your app using PM2:

Step 5 : Use PM2 to manage your app:

- Restart: pm2 restart app.js

- Reload: pm2 reload app.js

- Stop: pm2 stop app.js

- Delete: pm2 delete app.js

Congratulations! You have successfully installed and used PM2 on Ubuntu 24.10.