Node.js 作为现代 Web 开发的基石,持续为开发者带来性能提升和新特性支持。本文将详细介绍在 Windows、macOS 和 Linux 系统上安装最新 Node.js 的多种方法,助您快速搭建高效的 JavaScript 开发环境。
📦 当前最新版本
截至 2025 年 4 月,Node.js 最新长期支持版 (LTS) 为 22.14.0,建议所有开发者优先安装此版本。
🛠️ 安装方法推荐
方法一:使用 Node 版本管理器(推荐)
适用于所有操作系统
版本管理器允许同时安装多个 Node 版本,支持快速切换。
nvm 安装命令:
# Linux/macOS
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Windows (使用 nvm-windows) 下载地址:https://github.com/coreybutler/nvm-windows/releases
安装最新 LTS 版本:
nvm install --lts
nvm use --lts
方法二:官方安装包
Windows/macOS 用户
- 访问 Node.js 官网

- 下载 LTS 版本安装程序
- 修改各自的安装位置

- 其余直接 Next
- 安装完成


Linux 用户(Debian/Ubuntu)
# 添加 NodeSource 仓库
curl -fsSL https://deb.nodesource.com/setup_lts.x | -E bash -
apt-get install -y nodejs




