how to open ports on linux code example
Example 1: ports in use linux
# To see ports in use
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
Example 2: check what ports are open linux
## if you use linux
sudo ss -tulw
# To see ports in use
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
## if you use linux
sudo ss -tulw