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