• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Posts tagged su

BASH> Run command from root as another user

Oct26
2010
Written by Scott Rowley

Every once in a awhile you may find you need to run a command as a different user than yourself. In order to do so you will first need to be root, then perform the following:

su <username> -c '<command1>; <command2>;'
Posted in BASH - Tagged BASH, command, root, user

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top