I'm trying to use the hping3 tool on Debian GNU/Linux (Jessie), and it doesn't want to play nice. When I run apt-get install hping3, it tells me that it's at the latest version already. When I run whereis hping3, it shows that it's where it should be.

But when I try to use the tool, it says:

bash: hping3: command not found

I've read the syntax on the man page and done some googling, and I have absolutely no idea what the issue is. Has anybody else had this problem?

  • If you run the full path shown in there whereis output, does it work? May just be a PATH issue.
    – Jeff Schaller
    Feb 13, 2016 at 17:02
  • It works when I run the full path.
    – Mars
    Feb 13, 2016 at 17:08
  • To improve the quality of your questions, show the specific Google searches you have used. Searching on the error message you saw, which should be the first thing anyone tries, returns exactly the solution you need--- the PATH variable is not set right: Google search for "bash command not found" Feb 13, 2016 at 17:12
  • Which user are you using to run hping3? Feb 13, 2016 at 17:46
  • 1
    Rui: I was using my non-root account, which I've now realized is a mistake. I forgot you needed to have root access to do what hping3 does with the packets you send. Will: running that command shows nothing. I'll just try and fix the PATH issue, and if all else fails, make hping3 an alias for "/usr/sbin/hping3". I appreciate the edit, by the way. Formatting isn't my strong suit lol
    – Mars
    Feb 13, 2016 at 19:51

1 Answer 1


The thing is, hping3 installs into /usr/sbin and you are not able to find it because /usr/sbin is only available in root´s $PATH. To top it off hping3 is only meant to be run as root.

hping3 actually needs access to network API functionalities to spoof packets (raw sockets) that are not accessible to programs running with the permissions of normal users.

You must log in to answer this question.

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