我在〜/ .bash_profile中设置了几个别名,并且在/root/.bash_profile中设置了相同的别名,所以我可以使用v文件而不是
vim文件等.
当我实际以这些用户身份登录时,这些工作正常,但是当我执行类似sudo v文件的操作时,sudo无法找出别名并失败.
有没有办法让sudo理解别名?
echo "alias sudo='sudo '" >> ~/.bashrc . ~/.bashrc
If the last character of the alias value is a blank,then the next command word following the alias is also checked for alias expansion.