1 ---
2 title: Downloading and installing Node.js and npm
3 redirect_from:
4 - /getting-started/installing-node
5 ---
6
7 To publish and install packages to and from the public npm registry or a private 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 like [nvm](https://github.com/nvm-sh/nvm) 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.
8
9 <Note>
10
11 **Note:** to download the latest version of npm, on the command line, run the following command:
12
13 ```
14 npm install -g npm
15 ```
16
17 </Note>
18
19 ## Overview
20
21 - [Checking your version of npm and Node.js](#checking-your-version-of-npm-and-nodejs)
22 - [Using a Node version manager to install Node.js and npm](#using-a-node-version-manager-to-install-nodejs-and-npm)
23 - [Using a Node installer to install Node.js and npm](#using-a-node-installer-to-install-nodejs-and-npm)
24
25 ## Checking your version of npm and Node.js
26
27 To see if you already have Node.js and npm installed and check the installed version, run the following commands:
28
29 ```
30 node -v
31 npm -v
32 ```
33
34 ## Using a Node version manager to install Node.js and npm
35
36 Node 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.
37
38 ### OSX or Linux Node version managers
39
40 - [nvm](https://github.com/creationix/nvm)
41 - [n](https://github.com/tj/n)
42
43 ### Windows Node version managers
44
45 - [nodist](https://github.com/marcelklehr/nodist)
46 - [nvm-windows](https://github.com/coreybutler/nvm-windows)
47
48 ## Using a Node installer to install Node.js and npm
49
50 If 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.
51
52 - [Node.js installer](https://nodejs.org/en/download/)
53 - [NodeSource installer](https://github.com/nodesource/distributions)
54
55 If you use Linux, we recommend that you use a NodeSource installer.
56
57 ### OS X or Windows Node installers
58
59 If 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.
60
61 ### Linux or other operating systems Node installers
62
63 If you're using Linux or another operating system, use one of the following installers:
64
65 - [NodeSource installer](https://github.com/nodesource/distributions) (recommended)
66 - One of the installers on the [Node.js download page](https://nodejs.org/en/download/)
67
68 Or see [this page](https://nodejs.org/en/download/package-manager/) to install npm for Linux in the way many Linux developers prefer.
69
70 ### Less-common operating systems
71
72 For more information on installing Node.js on a variety of operating systems, see [this page][pkg-mgr].
73
74 [pkg-mgr]: https://nodejs.org/en/download/package-manager/