Skip to content

Instantly share code, notes, and snippets.

@letroll
Created August 7, 2017 15:21
Show Gist options
  • Select an option

  • Save letroll/2aae8954aa81e6a1d70c102480d9eece to your computer and use it in GitHub Desktop.

Select an option

Save letroll/2aae8954aa81e6a1d70c102480d9eece to your computer and use it in GitHub Desktop.
[run command with specific user] run a command with a specific user #run #command #user #bash #shell #unix
sudo -H -u otheruser bash -c 'echo "I am $USER, with uid $UID"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment