<分区>
我在 ~/.bashrc
和 /root/.bashrc
中添加了 PATH
,但是 sudo adb
仍然报告“找不到命令”?
我也重新启动了。
所以我需要一种方法让 sudo
的 .bashrc
与我用户的 .bashrc
同步?
路径是正确的,因为我可以从我的用户运行,而不是 sudo:
PATH=~/android-sdks/tools:$PATH
PATH=~/android-sdks/platform-tools:$PATH
最佳答案
哦,我明白了:
sudo -E adb
人须藤:
-E The -E (preserve environment) option will override the env_reset option in
sudoers(5)). It is only available when either the matching command has the SETENV
tag or the setenv option is set in sudoers(5).
关于bash - 我将路径添加到 ~/.bashrc 和/root/.bashrc,但是 "sudo adb"仍然报告 "command not found"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8549368/