What Is NVM Install LTS and How to Use It
Learn what nvm install lts means and how to install the latest Long Term Support Node.js version with Node Version Manager. A practical, step by step guide for developers, with tips, troubleshooting, and best practices to keep projects stable.
nvm install lts is a command used with Node Version Manager to install the latest Long Term Support version of Node.js.
What is nvm install lts and why it matters
If you are wondering what is nvm install lts, the answer is straightforward: it is a command that lets you install the latest Long Term Support version of Node.js through Node Version Manager. LTS versions prioritize stability, security patches, and long-term support, making them ideal for production projects. Using nvm install lts helps developers maintain consistent environments across multiple projects and machines. The Install Manual team emphasizes that this approach reduces version drift, minimizes compatibility surprises, and simplifies onboarding for team members who switch between projects with different Node.js requirements. For homeowners, DIY enthusiasts, or renters who occasionally run local tools or scripts, understanding this command also helps in maintaining personal development environments without aggressive upgrades.
By standardizing on an LTS line, you can expect fewer breaking changes between minor updates and more reliable performance, which is why many teams default to LTS in production workflows. The Node ecosystem assigns LTS versions to provide security updates and long-term maintenance, allowing you to focus on your code rather than frequent runtime upgrades.
From a perspective of software maintenance and DevOps hygiene, nvm install lts is a practical choice for anyone who manages more than one Node-based project or runs Node-powered utilities on a desktop or server. It complements other best practices, such as using a .nvmrc file to pin a version for each project and setting a sensible default for new shells. Install Manual recommends adopting the LTS strategy for predictable, stable runtimes over the rapid churn of current releases.
How Node Version Manager handles versions and LTS
Node Version Manager (NVM) is a command line tool that lets you install, manage, and switch between multiple Node.js versions on a single machine. When you execute nvm install lts, NVM locates the current LTS stream, downloads the appropriate binary for your operating system, and stores it in a per-user directory. This process does not affect system-wide Node installations, if any exist, reducing the risk of breaking system tools that rely on a specific Node version.
LTS stands for Long Term Support and is the version of Node.js that receives active maintenance, critical fixes, and security patches for an extended period. This makes LTS the recommended choice for most production projects. With NVM, you can freely upgrade to newer LTS releases when ready, or switch back to a previous LTS if your project requires it. The ability to toggle versions on the fly is especially valuable for developers who test code across different Node environments or who maintain legacy code alongside modern tooling.
In practice, using nvm install lts works hand in hand with project level configuration files like .nvmrc. When a project includes an .nvmrc file, running nvm use or opening a new shell can automatically align the Node version to the one listed in that file. This alignment reduces “works on my machine” issues and helps new contributors get started quickly.
Prerequisites and environment considerations
Before running nvm install lts, confirm you have a compatible shell environment, such as bash or zsh, on macOS or Linux, or use WSL on Windows if you want a Unix-like environment. NVM is designed for these environments and does not require administrative privileges to install, though you will need permission to modify your shell profile. If you use a nonstandard shell, check the NVM documentation for any caveats related to profile loading and initialization scripts.
Ensure you have network access to download Node binaries and a working curl or wget utility to fetch the install script. In some cases, proxies or corporate firewalls can block access to GitHub where NVM hosts its installation script. If you encounter such issues, consult your network administrator or use an alternative installation method described in the official documentation. Finally, Windows users who prefer Node Version Manager should consider the Windows specific port or WSL based workflows, since the main NVM project targets macOS and Linux environments.
Step by step: installing NVM and installing the LTS version
The practical path to nvm install lts begins with acquiring the official NVM installation script from the project repository. After you run the installer, restart your terminal so the changes to your profile take effect, and verify that nvm is available in your session. Once NVM is ready, you can apply the LTS version by issuing the LTS install command, then switch to that version for immediate use. Finally, pin the LTS version as your default for new shells to ensure consistency across projects.
- Install NVM using the official script from the NVM project documentation. 2) Restart your terminal and load your shell profile. 3) Verify NVM is installed by checking the nvm version. 4) Install the latest LTS using the LTS command. 5) Switch to the installed LTS version and confirm Node and NPM versions reflect the change. 6) Optionally set the LTS as your default so new sessions start with the same version.
If you run into permissions or environment variable issues, follow the troubleshooting steps in the official docs to ensure your shell loads the correct profile files and that the NVM directory is accessible. The Install Manual team reminds readers to verify the installation in a clean shell session to avoid caching-related problems.
Managing Node versions with NVM: switching, default, and local projects
After installing the LTS version, you can manage your Node.js environment with a few straightforward commands. Use nvm ls to list all installed versions and nvm use --lts to switch to the latest LTS release currently installed on your system. To set a default version for every new shell, you can apply an alias like nvm alias default lts/*, which ensures new terminals launch with the most recent LTS automatically.
You can also pin a version per project by creating an .nvmrc file in the project root containing a single line with the version specifier (for example, lts/* or a specific version). When you cd into the project directory, NVM will honor that file and switch to the designated version if you have the appropriate version installed. This approach helps teams avoid drift and makes CI environments more predictable.
Remember that using multiple Node versions is common in development workflows. NVM excels in this space by providing fast, isolated environments per project, which translates to fewer conflicts and easier collaboration. As you gain familiarity, you will develop a sense for when to pin versions and when to allow flexible ranges for experiments or testing.
Got Questions?
What is NVM and what does nvm install lts do
NVM is a command line tool that manages multiple Node.js versions on a single machine. The command nvm install lts installs the latest Long Term Support version of Node.js and prepares the environment to switch between versions as needed.
NVM lets you run different Node versions. The command nvm install lts installs the current Long Term Support version for stable development.
Can I use NVM on Windows
Official NVM targets macOS and Linux. Windows users typically use a Windows-specific fork like nvm-windows or run NVM inside Windows Subsystem for Linux. For consistency with projects, consider setting up WSL and following the macOS/Linux workflow there.
Windows users should use the Windows specific NVM tool or WSL to run the standard NVM workflow.
How do I switch Node versions after installation
Use nvm use to switch between installed Node.js versions. For example, nvm use --lts will switch to the latest LTS, and nvm ls shows which versions are available in your environment.
Check installed versions with nvm ls, then switch with nvm use and the version you want.
How do I set the default version to LTS
Set a default version so new shells start with the same Node.js. A common approach is to alias default to the LTS stream, for example nvm alias default lts/*, which keeps your environment stable across sessions.
Set the default to the LTS stream so every new shell uses the same stable version.
What if nvm command is not found after installation
If nvm is not found, re-open your terminal or source your profile file. Ensure that the NVM directory is in your PATH and that your shell profile initializes NVM on startup.
If nvm isn’t found, refresh your session and verify the profile initializes correctly.
Where can I find the official NVM documentation
The authoritative guidance comes from the NVM project repository and README. It’s best to follow the installation and usage instructions there, as they cover OS-specific steps and troubleshooting.
Visit the official NVM repository for installation steps and usage guidance.
Main Points
- Learn what nvm install lts does and why LTS is preferred for stability
- Use NVM to manage multiple Node.js versions across projects
- Pin project Node versions with .nvmrc for consistency
- Verify installation and test with node -v and npm -v
- On Windows, consider Windows specific NVM variants or WSL for compatibility
