Home >Operation and Maintenance >Linux Operation and Maintenance >How to install the latest version of nodejs under linux

How to install the latest version of nodejs under linux

WBOY
WBOYforward
2023-05-26 12:21:111391browse
1. Download the nodejs version corresponding to the system architecture. You can download it directly with wget, or you can download it and transfer it to linux via sftp
2. Unzip
tar
3. Set the environment variable PATH:
vim ~/.bashrc 
export PATH=/pkg/node-v10.8.0-linux-x64/bin:$PATH
# 关闭
source
4. Verification:
node -v
npm -v

What versions of Linux are there?

The versions of Linux are: Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and other versions. Among them, Deepin is one of the best-developed Linux distributions in China; Ubuntu Kylin is a derivative distribution based on Ubuntu; Manjaro is a Linux distribution based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP and is simple and easy to use; Ubuntu is a desktop application Mainly Linux operating system.

The above is the detailed content of How to install the latest version of nodejs under linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete