Ubuntu 简明教程

Ubuntu - Node.js

Node.js 是用于开发服务器端应用程序的流行 JavaScript 框架。在本章中,我们将了解如何在 Ubuntu 上安装 Node.js。

Node.js is a popular JavaScript framework used for developing server side applications. In this chapter, we will see how to get Node.js installed on Ubuntu.

以下是安装 Node.js 的步骤。

Following are the steps to get Node.js installed.

Step 1 - 运行以下命令。

Step 1 − Run the following command.

sudo apt-get install nodejs

它将安装 Node.js 所需的所有软件包

This will install all the necessary packages for Node.js

install necessary package

接下来,我们需要安装 Node.js 应用程序所需的 Node 包管理器。

Next, we need to install the Node package manager which is required for Node.js applications.

Step 2 - 运行以下命令。

Step 2 − Run the following command.

sudo apt-get install npm

将安装节点包管理器所需的所有软件包。

All the necessary packages for the node package manager will be installed.

necessary packages

Step 3 - 接下来,创建指向 Node.js 文件夹的符号链接。然后,运行 Node –v 命令和 npm –v 以查看已安装的 Node 和 npm 版本。

Step 3 − Next, create a symbolic link to the Node.js folder. Then, run the Node –v command and npm –v to see the Node and npm version installed.

create symbolic link