Linux and testing a service running on a port

Two really useful commands I use for testing if a service is running on a specific port:

You want to simulate running a service on a port (and you don't want to deploy a complete software stack :D   ).  Use: **nc -k -l 4444**

You want to check that your service is running on port 4444.  Use: > > **netstat -na | grep "LISTEN " | grep 4444** > > > > tcp4       0      0  *.4444                 *.*                    LISTEN > >

The output from the command confirms that a service is listening on port 4444.

Author | Miles Davenport

Career programmer, who designs, assembles, fixes, and supports customers, software and systems.