Ubuntu安装nodejs,指定版本nodejs
1. 更新apt-get
1 sudo apt-get update
2.
1 sudo apt-get install nodejs
3.
1 curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - 2 sudo apt-get install -y nodejs
4.
1 sudo apt install note 2 sudo apt-get install -y build-essential
5.
sudo npm config get registry
6.
1 sudo npm config set registry https://registry.npm.taobao.org
7.
1 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - 2 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list 3 sudo apt update 4 sudo apt install yarn 5 yarn --version
8.
1 sudo apt-get remove nodejs
9.
1 scp -r /mnt/d/demo /home/