I'm using Bash on Ubuntu on Windows as the command line tool.
I need to install Node and NPM, and on the download page for unix I need to choose between 5 different options: 32bits, 64 bits, ArmV6, ArmV7, Armv8. Arms themselves are either 32 or 64 bit so this left me a confused.
Are Arm versions meant for mobile devices? I couldn't find Bash/Ubuntu in any directory, and not in the 64 bit program directory.
If my Windows is 64 bit, can I assume that Bash/Ubuntu will be 64 bits as well, and that that is the right file to download?
WSL supports a variety of Linux distributions, including the latest Ubuntu release, Ubuntu 20.04 LTS and Ubuntu 18.04 LTS. You can find them by opening the Microsoft store app and searching for Ubuntu.
To change the version of Node. js you would like to use for a project, create a new project directory mkdir NodeTest , and enter the directory cd NodeTest , then enter nvm use node to switch to the Current version, or nvm use --lts to switch to the LTS version.
Node. js and npm packages are available from the default Ubuntu 18.04 repositories. At the time of writing, the version included in the Ubuntu repositories is v8.
To install node
and npm
in Ubuntu on WSL you need to install nvm
. It doesn't work with apt-install
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
export NVM_DIR="/home/yourusername/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Now restart bash, and then run
nvm install node
That will install the latest, if you wish to install a specific version
nvm install v6.11.5
You're all set.
Credit : https://winsmarts.com/how-to-install-node-on-linux-on-windows-wsl-65069ea5f83d
uname -a
Run the above command in WSl.
If it is 64 bit it will display the following
Linux Karthik-Pc 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22:57:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
If it is 32 bit then it will display
Linux Karthik-Pc 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22:57:00 PST 2018 i686 i686 i686 GNU/Linux
Btw you can easily download node and npm in wsl from apt.
apt-get install -y nodejs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With