'ss' command for checking sockets not found

16,599

Solution 1

As per comment above: Try with the full path;

/usr/sbin/ss

Solution 2

sudo yum install iproute2   #RHEL
sudo apt install iproute2   #Ubuntu

Solution 3

Install it using sudo yum install iproute

Share:
16,599

Related videos on Youtube

Blade1024
Author by

Blade1024

the more you learn, the more you realize how little you learn... -Socrates

Updated on September 18, 2022

Comments

  • Blade1024
    Blade1024 almost 2 years

    I get an error when I try to execute this command on Red Hat Linux.

    $ ss -s
    -bash: ss: command not found
    

    It is supposed to be for checking socket statistics. How do I execute this?

    • tink
      tink over 11 years
      Is the iproute package installed, are you root, or is /usr/sbin in your PATH?
    • Blade1024
      Blade1024 over 11 years
      ahh thanks... /usr/sbin/ss did the trick! thanks tink ;)
    • tink
      tink over 11 years
      You're welcome :) ... can a comment be flagged as a solution? ;D
  • jesse_b
    jesse_b over 4 years
    This does not provide a solution to OP's problem.
  • Jeff Schaller
    Jeff Schaller over 4 years
    To be fair, if the question is 'how do I execute ss when I'm getting "command not found"?', and the iproute package contains the ss program, then this addresses the core of the question. It does not address possible $PATH issues or explain why they think this is the right answer, but it's a least an attempt to answer the question.
  • Jeff Schaller
    Jeff Schaller over 4 years
    Hem, note my comments above and also the fact that this question was answered over 6 years ago and that answer was accepted. Did you intend this to be a complete answer, or as a comment on the other answer?
  • Mir-Ismaili
    Mir-Ismaili over 3 years
    cannot access '/usr/sbin/ss': No such file or directory
  • bu5hman
    bu5hman over 3 years
    While this was a possible answer to a similar problem it wasn't actually OP's problem which is hidden in the comments, as is the solution.