标签: bash ubuntu su
How can I run a one-shot command as root? I expect this to work but its clear that I am misusing it.
other_user$ sudo su -lc "echo $(whoami)" # => I expect "root" but get "other_user"