To install Node.js on Rocky Linux 9, follow the steps below.
Step 1 : Update
Ensure your system is up to date by running the following command:
Step 2 : Add Node.js Repository
Use the following command to add the Node.js repository to your system:
Step 3 : Now, install Node.js using the following command:
Step 4 : To confirm that Node.js has been successfully installed, check the version with:
Step 5 : Ensure npm (Node Package Manager) is installed by checking its version:
Congratulations! You have successfully installed Node.js on Rocky Linux 9.