“ping: socket: Operation not permitted” error on a clean Ubuntu 24.04 installation

ping did not work on my clean Ubuntu 24.04 installation showing the following error:

ping developernote.com
ping: socktype: SOCK_RAW
ping: socket: Operation not permitted
ping: => missing cap_net_raw+p capability or setuid?

I fixed this with the following commands:

which ping
getcap /usr/bin/ping
sudo setcap cap_net_raw+p /usr/bin/ping
getcap /usr/bin/ping
/usr/bin/ping cap_net_raw=p

1 Response to “ping: socket: Operation not permitted” error on a clean Ubuntu 24.04 installation

Leave a Reply

Your email address will not be published. Required fields are marked *