• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2section: configuring-npm
3title: install
4description: Download and install node and npm
5---
6
7# install(5)
8
9## Download and Install npm
10
11### Description
12
13To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. **We strongly recommend using a Node version manager to install Node.js and npm.** We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.
14
15### Overview
16
17- [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-node-js)
18- [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-node-js-and-npm)
19- [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-node-js-and-npm)
20
21### Checking your version of npm and Node.js
22
23To see if you already have Node.js and npm installed and check the installed version, run the following commands:
24
25```
26node -v
27npm -v
28```
29
30### Using a Node version manager to install Node.js and npm
31
32Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions.
33
34#### OSX or Linux Node version managers
35
36* [nvm](https://github.com/creationix/nvm)
37* [n](https://github.com/tj/n)
38
39#### Windows Node version managers
40
41* [nodist](https://github.com/marcelklehr/nodist)
42* [nvm-windows](https://github.com/coreybutler/nvm-windows)
43
44### Using a Node installer to install Node.js and npm
45
46If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system.
47
48* [Node.js installer](https://nodejs.org/en/download/)
49* [NodeSource installer](https://github.com/nodesource/distributions). If you use Linux, we recommend that you use a NodeSource installer.
50
51#### OS X or Windows Node installers
52
53If you're using OS X or Windows, use one of the installers from the [Node.js download page](https://nodejs.org/en/download/). Be sure to install the version labeled **LTS**. Other versions have not yet been tested with npm.
54
55#### Linux or other operating systems Node installers
56
57If you're using Linux or another operating system, use one of the following installers:
58
59- [NodeSource installer](https://github.com/nodesource/distributions) (recommended)
60- One of the installers on the [Node.js download page](https://nodejs.org/en/download/)
61
62Or see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.
63
64
65#### Less-common operating systems
66
67For more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].
68
69
70[pkg-mgr]: https://nodejs.org/en/download/package-manager/
71