无需确认即可安装 Wireshark

Mic*_*rog 5 apt sudo wireshark software-installation

当我尝试使用以下命令自动安装 Wireshark 时: sudo apt-get install -y wiresharkUbuntu 给了我该图像:

在此输入图像描述

如何从终端安装wireshark而不按“是”?为什么-y没有在该屏幕上跳过?

ldi*_*ias 3

干得

首先,配置debconf数据库:

echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections
Run Code Online (Sandbox Code Playgroud)

然后,安装 Wireshark:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install wireshark
Run Code Online (Sandbox Code Playgroud)

您可能还想抑制 apt-get 的输出。在这种情况下:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install wireshark > /dev/null
Run Code Online (Sandbox Code Playgroud)