Skip to content

Commit 59b0b39

Browse files
alnorrisljharb
authored andcommitted
[readme] Add quick intro to nvm
Allow newbies to get a quick understanding of how `nvm` works right from the start.
1 parent 7bbc573 commit 59b0b39

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
## Table of Contents
77

8+
- [Intro](#intro)
89
- [About](#about)
910
- [Installing and Updating](#installing-and-updating)
1011
- [Install & Update Script](#install--update-script)
@@ -55,6 +56,29 @@
5556

5657
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
5758

59+
## Intro
60+
61+
`nvm` allows you to quickly install and use different versions of node via the command line.
62+
63+
**Example:**
64+
```sh
65+
$ nvm use 16
66+
Now using node v16.9.1 (npm v7.21.1)
67+
$ node -v
68+
v16.9.1
69+
$ nvm use 14
70+
Now using node v14.18.0 (npm v6.14.15)
71+
$ node -v
72+
v14.18.0
73+
$ nvm install 12
74+
Now using node v12.22.6 (npm v6.14.5)
75+
$ node -v
76+
v12.22.6
77+
```
78+
79+
Simple as that!
80+
81+
5882
## About
5983
nvm is a version manager for [node.js](https://nodejs.org/en/), designed to be installed per-user, and invoked per-shell. `nvm` works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.
6084

0 commit comments

Comments
 (0)