Home > Article > Web Front-end > How to install Node.js 8 on Linux
Linux is a very popular operating system, and Node.js is one of the most popular technologies on the Linux platform. In this article, we will discuss how to install Node.js 8 on Linux.
Node.js is an event-driven, non-blocking I/O model JavaScript runtime environment. It enables efficient web applications and server-side scripts.
In order to install Node.js 8, we need to complete the following steps:
We can use the binary Linux distribution of NodeSource version to install Node.js 8. The following are the installation steps:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
node -v
If you have installed an old version of Node.js, you need to remove it using the following command:
sudo apt-get remove nodejs
npm is the package manager for Node.js. To install npm, we can use the following command:
sudo apt-get install npm
In Node.js, there are many commonly used npm packages. The following are some commonly used npm packages:
To install the above packages, use the following command:
sudo npm install -g express mongoose request
Summary
In this post, we have covered how to install Node on Linux .js8. We install by adding PPA and using apt-get command. We also introduced the installation of npm and the installation of commonly used npm packages. This will help you get started with Node.js 8 and provide a strong foundation for your next project.
The above is the detailed content of How to install Node.js 8 on Linux. For more information, please follow other related articles on the PHP Chinese website!