Ubuntu安装Node.js

Ubuntu安装Node.js

官网:

python 复制代码
https://nodejs.org/en/download
python 复制代码
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 24

# Verify the Node.js version:
node -v # Should print "v24.14.0".

# Verify npm version:
npm -v # Should print "11.9.0".

也可以使用Docker方式安装,指令如下:

python 复制代码
# Docker has specific installation instructions for each operating system.
# Please refer to the official documentation at https://docker.com/get-started/

# Pull the Node.js Docker image:
docker pull node:24-alpine

# Create a Node.js container and start a Shell session:
docker run -it --rm --entrypoint sh node:24-alpine

# Verify the Node.js version:
node -v # Should print "v24.14.0".

# Verify npm version:
npm -v # Should print "11.9.0".
相关推荐
小疙瘩9 小时前
只是记录自己发布若依分离系统到linux过程中遇到的问题
linux·运维·服务器
我是伪码农10 小时前
外卖餐具智能推荐
linux·服务器·前端
皮皮林55111 小时前
强烈建议大家使用 Linux 做开发?
linux
IMPYLH11 小时前
Linux 的 od 命令
linux·运维·服务器·bash
CodeCaptain12 小时前
【六】OpenClaw 从 TUI 切换到 Web 端完整方案
ubuntu·ai·openclaw
Kk.080212 小时前
Linux(十一)fork实例练习、文件操作示例及相关面试题目分享
linux·运维·算法
数据雕塑家13 小时前
Linux下大文件切割与合并实战:解决FAT32文件系统传输限制
linux·运维·服务器
IMPYLH13 小时前
Linux 的 nice 命令
linux·运维·服务器·bash
l1o3v1e4ding13 小时前
排查linux CentOS7.6的mysql磁盘 I/O 延迟过高问题
linux·运维·mysql
Edward1111111115 小时前
linux创建普通用户
linux·运维·服务器