see ports in use rpi code example Example 1: open ports on RPI netstat -lptn Example 2: open ports on RPI netstat --tcp --listening --programs --numeric