有人能解释一下这个sudo apt-get install -y <package>
做什么吗?-y 到底代表什么?
答案1
它代表是,因此对于该apt-get
命令生成的任何问题都会回答是。
您可以通过查看命令手册页来了解命令的选项man
。在输出中,man apt-get
您可以找到以下部分:
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occurs then apt-get will abort. Configuration Item: APT::Get::Assume-Yes.