Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node installation in Ubuntu using curl

I am installing NodeJS in ubuntu using the commands that is described on the Node JS website (here) :

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -

sudo apt-get install -y nodejs

Its working fine but i did not understand how did it worked?

like image 204
Meetesh Avatar asked Sep 14 '25 15:09

Meetesh


1 Answers

potentially quite a few things are happening here depending on what sort of system you are running. In simple terms -

1) Curl downloads a bash script which is piped to a new shell

2) The new shell excutes the script with superuser privillege

3) This script adds new URLs to your repo lists that means...

4) ...when you type in your apt-get command it now knows where to go to get 'nodejs' in order to actually install it

like image 158
Simon Denvir Avatar answered Sep 16 '25 05:09

Simon Denvir