Sunday, April 3, 2022

How to check if the port is up or a service is running command line Windows and UNIX

In order to check for service status we have below 2 options to check. You need to have the host name and port number to check if the port is running.

Windows: From the source system/server follow below steps:

a. Open command prompt by clicking start button and click on command prompt

b. Type below command and hit enter

telnet host_ip/hostname port_number

Ex: telnet 10.10.10.12 80

Host ip is the ip address of the server/computer where the service is running and port number is the actual port number assigned to the service.

After running the command if you see a blank screen, the port is up and the service is running.


If you do see unable to connect message means either service is not up or the source server is not able to reach to the destination. Try to use tracert command to figure out.


If you receive telnet command not found, click on below link to install telnet command on Windows.

TroubleShooting: How to enable telnet in windows (aksanswer.blogspot.com)

Unix: For unix, run the same command

telnet destination_ip/host_name port_number

Ex: telnet 100.200.1.1 8080

If telnet command not found, please check corresponding unix/linux installation procedure and try the same once the telnet command is installed.

 

No comments:

Post a Comment

Set up gmail in outlook using app password

You might receive an error saying, "unable to connect to your outgoing server" while setting up a gmail account in outlook even wh...