Find Used Ports
An example of the netstat command with flags:
## Show listening sockets ##
sockstat -l
## Show listening sockets for IPv4 only ##
sockstat -4 -l
## Show listening sockets for IPv6 only ##
sockstat -6 -l
Find Selected Ports
You can use the grep command to select a certain ports. In this example, find out if port 22 and 80 is open or not:
sockstat -4 -l | grep :22
sockstat -4 -l | grep :80
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper