Steps For installing Specific Version of Ubuntu using NVM
In Order to install specific version of node in ubuntu we will be using a tool called NVM which stands for node version manager.
NVM helps us to install and manage multiple versions of node in a single machine.It helps to switch between different versions
To install NVM , Run below commands in a terminal
- sudo apt-get update
- sudo apt-get install build-essential libssl-dev
- curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | sh
To gain access to the nvm functionality, you'll need to log out and log back in again, or you can source the~/.profile file so that your current session knows about the changes:
source ~/.profile
Now that you have nvm installed, you can install isolated Node.js versions.
To find out the versions of Node.js that are available for installation, you can type:
nvm ls-remote
nvm install 6.0.0
nvm install 6.0.0
You can change to what ever version you like.
Usually, nvm will switch to use the most recently installed version. You can explicitly tell nvm to use the version we just downloaded by typing:
nvm use 6.0.0
node -v
nvm ls
nvm alias default 6.0.0
To remove / uninstall a version
nvm uninstall 6.0.0
To Exeute node REPL/command line with specific version
nvm run 6.0.0
In NVM, you can also use alias for setting the default version of node
nvm alias default 6.0.0.
Each version of Node.js will keep track of its own packages and has npm available to manage these.
You can learn more about the options available to you with nvm by typing:
nvm help
No comments:
Post a Comment