Thursday, December 20, 2012

run command as another user in linux using "sudo"

#this will run the command with another user's environment and account.
sudo -i -u username command

Reference
http://linux.die.net/man/8/sudo

No comments:

Post a Comment