I am trying to use haproxy on linux. I installed it using sudo apt install haproxy but after install is complete when I run haproxy -vv i get error haproxy: command not found. I tried running sudo systemctl status haproxy.service -l --no-pager and it shows that haproxy load balancer is active(running). What is happening? Why isn't haproxy command not found? Thanks in advance.

  • Why do you think such command should be? Its just your wish?
    – gapsf
    Sep 12 at 15:17
  • Try 'sudo haproxy', 'type haproxy', 'find / -iname haproxy'
    – gapsf
    Sep 12 at 15:24

1 Answer 1


Probably the executable is installed in a directory that isn't in your $PATH. You can run dpkg -L haproxy to see exactly where things were installed. On an Ubuntu 20.04 system, if I apt install haproxy, I see:

$ dpkg -L haproxy | grep bin/

So we can see that the executable is in /usr/sbin/haproxy.

Often, /usr/sbin isn't in the $PATH of non-root users. You can add it to your $PATH, or just use the fully qualified path (/usr/sbin/haproxy).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.