Created
May 1, 2023 13:46
-
-
Save mehmt948/0ed552f0b41e253a167f5f7a93a31dd5 to your computer and use it in GitHub Desktop.
Install Node.js using nvm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Download and run the NVM installation script | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | |
# Reload the shell configuration to make the nvm command available | |
source ~/.bashrc | |
# Print instructions for listing versions of Node.js | |
echo "list versions -> 'nvm list-remote'" | |
# Print instructions for installing a specific version of Node.js | |
echo "install a version -> 'nvm install lts/hydrogen'" | |
# Print instructions for selecting a specific version of Node.js | |
echo "select a version -> 'nvm use lts/hydrogen'" | |
# Print instructions for setting the default version of Node.js | |
echo "select the default version -> 'nvm alias default 16.19.0'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment