Using the command prompt


Using the command prompt is a fast and efficient way of locating vital information on a wide array of components and devices for your computer and will often be faster than searching the windows control panel. To that end, I have created a How-to guide on some of the most commonly used commands.

Checking Local Area Network Information

One of the most common commands run at the command prompt is ipconfig /all. This command gives you all the detailed information of your network adapter.

Type CMD in your start menu.

Type ipconfig /all and press the enter key.

command prompt ipconfig /all
ipconfig /all

(Note that in some cases you may have to right + click cmd and Run As Administrator.)

Command Prompt Run as admin
Run As Admin

All the info on your network adapter is displayed.

Break Down of Ethernet Adapter Properties

You will need to know your network information for such things as identifying devices on the network, configuring protocols, device security, and other 3rd party devices such as firewalls, switches, hubs, gateways, servers, NAS devices security cameras, in an ever-growing market of devices.

Physical Address is the MAC address of your Network Adapter, this should remain hidden or be kept a secret to others, as it is a unique ID for your Network Adapter on the LAN.

Default Gateway address often is the Router or Modem, main address for (DHCP) Dynamic Host Control Protocol, as it assigns addresses to all connected devices on the LAN, IPv4 and IPv6 addresses are leased to devices at physical addresses.

Typical subnet prefixes for the devices on the LAN are 192.168.0.* or 192.168.1.* or 10.0.0.* or 10.0.1.* but your network devices may differ. Refer to your system administrator or the manufacturer of your network products if you are unsure.

DNS Address or Domain Name System is what resolves URL requests of the WAN – Wide Area Network to all LAN Client Devices making requests.

As an example a client browser request for URL address information, instead of using an IP Address such as we can use a name, which resolves the correct IP address for the hostname HTTP or HTTPS Web server which is sent and responds with the port TCP 80 or 443 requests to serve the page information to a Client Address with your WAN host IP address. From the Gateway address, it then routes the request to the LAN Client Device at the physical address the request was made from.

Once the client device browser has received the page file information it then loads the page.

Renaming Files

Using the command prompt to rename files is a fast and efficient way to convert file types. For example, I created a hosts file on my desktop, as the host file in the dir C:\Windows\System32\drivers\etc is not directly editable. Once I created the file it was created using a txt file extension. To change this do the following.

Type CMD in your start menu

Type dir and then type CD Desktop to change directories to your desktop path


Type rename “filename” and then “filename + new extension” and press enter

Example: rename hosts.txt hosts

command prompt rename files

You will notice the file name changed and now has the new extension you gave it. In this example, I am modifying my hosts file so there is no extension (IE – .txt .doc .exe) so I left the field empty.

Check Communication Using PING

The following are the steps to ping addresses to check if you’re formulating a connection to internal and external addresses.

Type CMD in the start menu.

Type ping and the address name

Example: or an IP address like

If you see general failure you will know your connection is timing out before reaching its destination or has been blocked.

command prompt ping
ping “IP address or URL name”

This is where you will want to begin LAN or WiFi Troubleshooting to what is causing the loss.

LAN Troubleshooting

WiFi Troubleshooting

Checking Route of Communication

In these steps, I give examples of the DOS command tracert. The Traceroute command is a good way to determine the route of an IP address and determine if there is packet loss at any of the hops, or finding the physical location of a specific address.

Type cmd in your start menu.

Type tracert and then the address

Example: tracert or

command prompt tracert

In this example of tracert you can see the route the packet information is flowing through, as you can see from this example there is a loss of packet information at one of our hops where the request timed out as the destination was unreachable.

Checking Running Process Communication

In the following steps I give examples of the netstat command, this command shows all connections to your PC and can be very useful in locating unwanted or unneeded connections as well as open ports or ports that are in use by another process (PID).

Your results will undoubtedly differ from mine but it gives you a good way to lock down any open ports or find what processes are using a socket or port.

Type cmd in your start menu.

Type netstat to list your connections.

command prompt netstat
netstat without flags

(Note – Under netstat help command you can find a list of additional options for limiting or expanding the view of ports listed in netstat, protocols, address information, etc.)

command prompt netstat help
netstat help

Each of the Flags will filter the output of the netstat command showing only the information you need to see in order to troubleshoot any connections or related problems that may be occurring. Keep in mind finding the PID or Process ID will help you find the service or application that may be using ports or sockets. Using task manager will allow you to correlate your connection information with which services or processes are currently utilizing the port or socket.

In Windows 10 or Windows 8 this can be done by pushing Ctrl + Shift + Alt or CTRL + ALT + DEL and selecting Task Manager and then viewing the Details tab.

In Windows 7 this can be done by CTRL + ALT + DEL or Searching the start menu for taskmgr.exe

You can find a more detail list of Command Prompt commands as I have created a Reference chart here.

%d bloggers like this: