>
> > $ sudo ss -l4pon | grep [port]
>
> That grep command is wrong in a couple ways.
>
> First, the unquoted [port] is a live glob pattern for the shell.


I meant port number here, i.e.:
$ sudo ss -l4pon | grep 80


> Finally, you added the -n option to ss, which means it no longer prints
> service names; it prints port numbers instead.


Exactly, because I had a port number in my mind


> (And now that I've written all of this, it occurs to me that maybe
> you were using [port] as a syntactic symbol meaning "put the numeric
> port number here".  Normally we'd use <port> or _port_ for that.


Yes, you are right. I should have written it as <port>, not [port].
Sorry for the misleading comment.

I was trying to say that in modern Linux netstat is not installed by default
and ``ss`` is a preferred way.

Reply via email to