I attempted to install a software package on a server and the installation failed due to an existing application using the desired port.  Since it was a non-standard port, I didn't know what was using the port but I needed to find it and either kill it or move it.

    Let's say for example, we're looking for the process living on port 3389 (the remote desktop / terminal services port).  First, we run:

    netstat -ano | findstr :3389

    The return should present you with several lines.  One of them should look like this:

    TCP   192.168.1.100:3389    0.0.0.0    LISTENING    [processid]


    We like to use the best operating for the job and we use a mixture of Windows, Mac and Linux.  Our typical Linux installation is a virtualized system and it does not include a desktop; we do all of the administration from the command line.

    The other day, we were asked to propose a solution which installs on Linux but the installation must be performed from a Linux desktop.  No problem, we installed the desktop package with the following command:


    I recently came across an Apache web server with a number of virtual hosts under /var/www.  Pointing a browser to the root, /var/www, would reveal all of the names of the virtual hosts on the server.  While not tragic, it does reveal some information that we would prefer not be visible to the general public.


    © 2020 sevenlayers.com