DEV Community

NeulChan Gong
NeulChan Gong

Posted on • Edited on

[Linux Commands] Check what well-known "port number" are there.

Notice: Printed output does not means to assigned and operating in system. It may or not.

┌ Print all of services
│$ cat /etc/services
│      ────┬────────
│          └'has well-known port info'
└─────
Enter fullscreen mode Exit fullscreen mode
┌ Print specific service
│$ grep -w 7000 /etc/services
│          ─┬──
│           └'port-number you interested in'
└─────
Enter fullscreen mode Exit fullscreen mode
┌ Print specific service
│$ egrep -w '7000/(tcp|udp)' /etc/services
│            ─┬────────────
│             └'port-number & protocol-type'
└─────
Enter fullscreen mode Exit fullscreen mode

Top comments (0)