su - root -c "your command"
su - yourUserName -c "YourCommand"
详细参考
来源:https://www.cyberciti.biz/open-source/command-line-hacks/linux-run-command-as-different-user/