curl - NodeJS install on Ubuntu -
i've installed nodejs on ubuntu, followihg instructions node site. went ok, kind of confused have done.
i enterred following 2 commands:
curl -sl https://deb.nodesource.com/setup_4.x | sudo -e bash - sudo apt-get install -y nodejs
the second 1 clear me. first command do?
curl command-line tool transfer data using urls. in case making request https://deb.nodesource.com/setup_4.x
.
the -l
option (if read the curl
manual page) means if server responds redirect, curl
try new location.
the -s
option means curl
should silent, , not print errors or progress or other informational messages.
the data curl
receives printed on standard output.
this output piped input sudo -e bash -
command. sudo
command runs specified command superuser root
. option -e
tells sudo
preserve environment (e.g. $path
environment variable etc.).
the command sudo
runs bash -
, standard linux shell. trailing dash (-
) tells bash should run login shell. bash
command read standard input , execute normal shell commands.
so whole line does, download shell-script https://deb.nodesource.com/setup_4.x
, use input shell execute superuser privileges.
Comments
Post a Comment