在 ~/.bashrc下加入以下一行(注意：sudo 后面有个空格)：
alias sudo="sudo "
How does this work?
When running a command, only the first word is checked against your aliases. So myalias by itself will work, but running sudo myalias means that only sudo is checked against your aliases – not the second word myalias.
The trick of aliasing sudo to itself (plus a space!) works because “[when] the last character of the alias value is a space or tab character, then the next command word following the alias is also checked for alias expansion.” – from the bash manual