gerhaus.blogg.se

Change nvm version
Change nvm version








change nvm version change nvm version

If we want to install the latest LTS (Long term support) Node.js version we can use this command adding the –lts flag at the end: nvm install –lts You will notice that the latest available version is now installed on our server. If we now check the Node.js version with: node -v Now to install the latest Node.js version we can simply run: nvm install node Installing Node.js and switching versions This will print a large list of all the available versions for Node.js starting from version v0.1.14 to the latest version currently available. For example, you can use the following command to check all the available versions for Node.js: nvm list-remote The npm can be used to install different Node.js versions. bashrc file as an argument for the changes to apply.Īfter the installation has finished, we can check if nvm has been installed with the following commands: nvm –version We use the first command to download and execute the script that installs nvm and with source ~/.bashrc, we are running the source command with. You can now go ahead and install nvm using the following commands: curl -o- | bash You can do this by running the following commands: apt-get update -y Additionally, replace ‘root’ with the username of the admin account if necessary.īefore starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. Log in and update the systemįirst, you will need to, log in to your Ubuntu 20.04 server via SSH as the root user: ssh -p Port_number You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Access to the root user account (or access to an admin account with root privileges)įor this example we will be using Ubuntu 20.04 as the default OS, Node.js can be also installed and run on many different distributions.Installing Node.js and switching versions.










Change nvm version