[英]How to set input from bash script in an interactive shell?
The preferred way of achieving this is using unattended mode by setting the following environment variable before calling apt install
:实现此目的的首选方法是通过在调用
apt install
之前设置以下环境变量来使用无人值守模式:
export DEBIAN_FRONTEND=noninteractive
This will not prompt the user for any input but instead use the default values for everything.这不会提示用户进行任何输入,而是对所有内容使用默认值。
If you want to supply an answer to a configuration question different to the default value, use preseeding DebConf .如果您想提供与默认值不同的配置问题的答案,请使用预置 DebConf 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.