Thursday, March 26, 2015

Source with sudo privileges

To run a list of commands from a file using source and give sudo privileges in the same time, command sudo source will not work since there is no executable to run for sudo, source is a shell built-in.

sudo bash -c "source file_name"

No comments:

Post a Comment