简体   繁体   English

在Ubuntu 18.04上使用bash编写“ sudo apt upgrade”脚本时,如何自动绕过“包配置”屏幕?

[英]When scripting “sudo apt upgrade” with bash on Ubuntu 18.04, how can you automatically bypass the “package configuration” screen?

Folks, I've almost fully automated my script to do an initial software install from an Ubuntu 18.04 EC 2 image AWS. 伙计们,我几乎完全自动化了脚本,以从Ubuntu 18.04 EC 2映像AWS进行初始软件安装。 When I run upgrade, several package configuration windows pop up and require user interaction. 运行升级时,会弹出几个软件包配置窗口,需要用户交互。 Does anyone know how to bypass these messages? 有谁知道如何绕过这些消息? I appreciate your help! 我感谢您的帮助! Best Regards, Tom 最好的问候,汤姆

#!/bin/bash
sudo apt update && sudo apt upgrade -y

Package Configuration window that appears when you run "sudo apt upgrade" 运行“ sudo apt upgrade”时出现的“程序包配置”窗口

尝试从超级用户这个答案

sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM