Suppose I have the following command

curl -Lo .amb j.mp/docker-ambari && . .amb && amb-deploy-cluster

(assuming this is running on vagrant - so not a real machine)

And I know I've got a permission issue and want to add sudo - do I need to add it once:

sudo curl -Lo .amb j.mp/docker-ambari && . .amb && amb-deploy-cluster

or more?

sudo curl -Lo .amb j.mp/docker-ambari && sudo . .amb && sudo amb-deploy-cluster
  • This is a great question! – Luke Shimkus Aug 25 '14 at 14:23

Yes you have to use sudo for each command or

you can use

sudo sh -c "gedit first; gedit second"

Above creates a documets first and second with root privllages. Separate the commands with semicolon ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.