5

When I tried to install Wireshark automatically with : sudo apt-get install -y wireshark Ubuntu gave me that image:

enter image description here

How can I install wireshark from terminal without press "YES" ?why does -y didn't skip on that screen?

3
  • Welcome! -y refers to apt installation, the windows you show is the wireshark configuration of the package. Sep 17, 2020 at 15:50
  • @schrodigerscatcuriosity I want that auto confirm, to install Wireshark automatically Sep 17, 2020 at 15:51
  • curious... you only need to do it once though surely...
    – graham
    Sep 17, 2020 at 16:00

1 Answer 1

3

Here you go!

First, configure the debconf database:

echo "wireshark-common wireshark-common/install-setuid boolean true" | sudo debconf-set-selections

Then, install Wireshark:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install wireshark

You might also want to suppress the output of apt-get. In that case:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y install wireshark > /dev/null
2
  • 1
    This is the right answer if you're installing in a Docker container. In my case, the tshark package has a dependency in wireshark
    – phil-lavin
    Mar 10, 2022 at 12:40
  • 1
    It's irrelevant 'why'. The question was 'how'! And some of us are facing situations where neither screen nor keyboard is accessible when installing stuff - on daily basis. Thanks for the answer!
    – tishma
    Jun 29, 2022 at 13:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .