NodeJS installation in Ubuntu server


Installing NodeJS in Ubuntu

— NodeJS installation is pretty simple in Ubuntu, We just need to run below command and NodeJS gets installed :

sudo apt-get install nodejs

— If the package in the repositories suits your needs, this is all that you need to do to get set up with Node.js. But in most cases, you’ll also want to also install npm, which is the Node.js package manager. We can do this by typing command :

sudo apt-get install npm

— I will strongly recommend to install “nodemon” as its saves you time and effort by automatically restart node application with changes in files. Nodemon watches the files in the directory in which nodemon was started, and if any files change, nodemon will automatically restart your node application.

To make nodemon work in Ubuntu servesr, we need to use below commands:

    • sudo apt-get install node


    • sudo apt-get install nodejs-legacy


    • sudo npm install -g nodemon

— That’s all – node, npm and nodemon is installed in your Ubuntu server.


One thought on “NodeJS installation in Ubuntu server”

Leave a Reply

Your email address will not be published. Required fields are marked *