Qingquan-Li / blog

My Blog
https://Qingquan-Li.github.io/blog/
132 stars 16 forks source link

Ubuntu install Node.js #179

Open Qingquan-Li opened 2 years ago

Qingquan-Li commented 2 years ago

References:

$ cd ~
$ curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
$ sudo apt install nodejs

$ node -v
v16.13.0
$ npm -v
8.1.0

-fsSL meaning:

References: https://curl.se/docs/manpage.html

sudo -E bash - meaning:

References: https://askubuntu.com/questions/891872/pipe-to-sudo-e-bash

It's a short way of executing a script without having to save the file and then execute it with root privileges.