Can't open wireshark from mac terminal

Hi,


is there a way to open wireshark from mac terminal while troubleshooting some networking stuff?

I work as cloud eng and it way faster and easier to run and open tcpdump live file from terminal insted

my co-worker using linux ubuntu based laptop, and by running simple command below can open live traffic in pcap:

sudo /opt/company/bin/tcpdump.sh -i any -U -nn -s0 -w - not port ssh and not arp and not host localhost and not host 64.225.90.205 | wireshark -k -i - -o 'gui.window_title:KSW'


wireshark already installed using CLI , but from Terminal can't see it or open it:

mulhamaljundi@Mulhams-MBP ~ % brew install --cask wireshark   
.
.
.
🍺  wireshark was successfully installed!
mulhamaljundi@Mulhams-MBP Applications % 
open Wireshark
The file /Users/mulhamaljundi/Applications/Wireshark does not exist.
mulhamaljundi@Mulhams-MBP Applications % which wireshark
wireshark not found
mulhamaljundi@Mulhams-MBP Applications % 


if I go to finder, application, I can see wireshark is there and I can open it normally, is there a limitation for this?


I have Macbook pro M2 macOS Ventura version 13.3.1


Thank you in advance.

MacBook Pro 13″, macOS 13.3

Posted on Apr 11, 2023 7:32 AM

Reply

Similar questions

1 reply

Apr 11, 2023 10:40 AM in response to mulhamaljundi

Short version: you're doing it wrong.


For a start, open will open a file in the current directory, which is not where brew will install the executable.

There might be a GUI app in your Applications directory, but that would be Wireshark.app and open is very particular about file name extensions.


Additionally, which will identify UNIX executable files in your $PATH, and your Applications directory is likely not in your $PATH (it's not normally part of the UNIX hierarchy).


So, you need to provide open with the proper path to the application, including the .app extension (likely open /Applications/Wireshark.app), or use the -a switch to specify the name of the application (open -a Wireshark).


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't open wireshark from mac terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.