what is linux nvm

藏色散人
Release: 2023-03-27 10:23:04
Original
2442 people have browsed it

linux nvm refers to the Nodejs version manager, and its full English name is "Node Version Manager"; installing nvm under linux can quickly switch node versions, which means that the role of nvm is to help us quickly Switch node version.

what is linux nvm

The operating environment of this tutorial: linux5.9.8 system, nvm 6.9.0, Dell G3 computer.

What is linux nvm?

Install nvm under linux to quickly switch node versions

nvm (Node Version Manager) is a Nodejs version manager that can quickly switch between different node versions.

Why use NVM?

There are more and more node-based tools and projects, but the node version used by each project may be inconsistent, and some strange problems will occur. For example: The latest version of node is installed on your computer, but the project you take over uses a lower version of node. Then I can only switch to a lower version of node and perform the operation without error. NVM is used to help us quickly switch node versions.

nvm installation process in linux

Open the address of nvm in github: https://github.com/nvm-sh/nvm

what is linux nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Copy after login

what is linux nvm

When you use nvm list at this time, you will be told that the nvm does not exist

what is linux nvm

Solution :

source ~/.bashrc
Copy after login

Then execute nvm list and you can see

what is linux nvm

nvm’s common commands

nvm list or nvm ls Check the installation version of node

nvm install 6.9.0 Install a 6.9.0 version of node

nvm use 6.9.0 Use this 6.9.0 version of node

nvm uninstall 6.9.0 Delete the node version 6.9.0

nvm ls-remote List the remote node version

nvm current View the node version currently in use

nvm alias default v4.3.0 switches v.4.3.0 to the default version. Every time you create a new command line, it will be the default version.

npm list --depth=0 -g View all npm packages installed globally

Recommended learning: "linux video tutorial"

The above is the detailed content of what is linux nvm. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!