I had installed wireshark and it needs sudo to run, there is guide for reconfigure it in debian based distros via dpkg, is there a way to do it cleanly via pacman too?
You should probably always start at the wiki.
I think the answer to your question is what package you installed…read for more details.
https://wiki.archlinux.org/title/Wireshark
Also I fail (maybe my failing) to understand what the title has to do with your question.
Is there a reason why you are not using sudo? It is enabled as default on EOS.
Using sudo is exactly the same as running as root.…exactly. And not recommended.
Okay. I may be dumb, but how sudo is exactly like running in root? One is taking super user privileges for a while, when another is running as super user whole time?
And where it is said that this is not recommended? I am genuinely asking, because I have not stumbled this before.
I understand that running your system whole time as root is a bad idea, but I find it hard to understand why using sudo is so bad?
The point is that wireshark should never be run as root. Using sudo to run it as root is the same as running it from a root shell.
Ah, yes of course! I understood the comment of dbarronoss that using sudo is always a bad idea.
Now I got the point. Thanks!
You should add your user to the “wireshark” user group and then you should be able to run it without sudo. From the Arch Wiki regarding Wireshark:
Do not run Wireshark as root; it is insecure. Wireshark has implemented privilege separation, which means that the Wireshark GUI (or the tshark CLI) can run as a normal user while the dumpcap capture utility runs as root[1].
The wireshark-cli install script sets packet capturing capabilities on the
/usr/bin/dumpcap
executable.
/usr/bin/dumpcap
can only be executed by root and members of thewireshark
group, so to use Wireshark as a normal user, you have to add your user to thewireshark
user group.