我正在使用命令对包进行测试apt-get --dry-run,但是我没有使用sudo. 不使用是否会sudo以某种方式影响结果,或者sudo对于这样的模拟来说没有必要?
当您apt-get --dry-run在没有 的情况下运行时sudo,您会收到警告:
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Run Code Online (Sandbox Code Playgroud)
所以最好使用sudo来进行真正的测试。