0% found this document useful (0 votes)
289 views6 pages

10 Useful Windows Networking Commands

The document discusses 10 useful Windows networking commands, including ping, ipconfig, hostname, getmac, arp, nslookup, nbtstat, net, netstat, and taskkill. It provides examples of how to use each command and brief explanations of their functions, such as using ping to detect devices on a network, ipconfig to view IP addresses and DNS settings, and taskkill to end running processes. The commands can be used for tasks like troubleshooting networking issues, viewing system information, and managing users, services, shares and more.

Uploaded by

Leon Kityamwi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
289 views6 pages

10 Useful Windows Networking Commands

The document discusses 10 useful Windows networking commands, including ping, ipconfig, hostname, getmac, arp, nslookup, nbtstat, net, netstat, and taskkill. It provides examples of how to use each command and brief explanations of their functions, such as using ping to detect devices on a network, ipconfig to view IP addresses and DNS settings, and taskkill to end running processes. The commands can be used for tasks like troubleshooting networking issues, viewing system information, and managing users, services, shares and more.

Uploaded by

Leon Kityamwi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

10 Useful Windows Networking Commands

Windows has some very useful networking utilities that are accessed
from a command line (cmd console).

On Windows 10 type cmd in the search box to open a command console.

The networking commands are mainly used for getting system information and
troubleshooting networking problems.

Here we look at the 10 commands that I use most often.

1. Ping Command

The ping command is one of the most often used networking utilities for detecting devices on
a network and for troubleshooting network problems.

When you ping a device you send that device a short message, which it then sends back (the
echo).

The general format is ping hostname or ping IPaddress.

Example

ping www.google.com or ping 216.58.208.68

This article covers the ping command in more detail

2. ipconfig Command

Another indispensable and frequently used utility that is used for finding network information
about your local machine-like IP addresses, DNS addresses etc

Basic Use: Finding Your IP Address and Default Gateway


Type the command ipconfig at the prompt.

The following is displayed

Ip config has a number of switches the most common are:

ipconfig /all – displays more information about the network setup on your systems including
the MAC address.

ipconfig /release – release the current IP address

ipconfig /renew – renew IP address

ipconfig /? -shows help

ipconfig/flushdns – flush the dns cache

3. Hostname Command

A very simple command that displays the host name of your machine. This is much quicker
than going to the control panel>system route.

4. getmac Command

Another very simple command that shows the MAC address of your network interfaces

5. arp Command
This is used for showing the address resolution cache. This command must be used with a
command line switch arp -a is the most common.

Type arp at the command line to see all available options.

See using arp in the basic networking course

6. NSlookup

Used for checking DNS record entries. See Using NSlookup for more details

7. Nbtstat

Diagnostic tool for troubleshooting netBIOS problems. See This technet article.

8 Net Command

Used for managing users,service,shares etc see here

9. Netstat Command

Used for displaying information about tcp and udp connections and ports. See tcp and udp
ports and sockets and how to use the netstat command

10. TaskKill Command

View a list of running tasks using the tasklist command and kill them by name or processor
ID using the taskKill command- See this tutorial.

Resources:

Kill Processes from Command Prompt


Posted in Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP by Steve
Sinchak
I'm sure you are familiar with the traditional way to kill or end a process in Windows using
Task Manager. This method is effective but not nearly as fun as killing a process in
Command Prompt. Additionally, killing processes in Command Prompt provides much more
control and the ability to end multiple processes at once.

All of this is possible with the TaskKill command. First, let's cover the basics. You can kill a
process by the process ID (PID) or by image name (EXE filename).

Open up an Administrative level Command Prompt and run tasklist to see all of the running
processes:

C:\>tasklist

Image Name PID Session Name Mem Usage


========================= ======== ================ ============
firefox.exe 26356 Console 139,352 K
regedit.exe 24244 Console 9,768 K
cmd.exe 18664 Console 2,380 K
conhost.exe 2528 Console 7,852 K
notepad.exe 17364 Console 7,892 K
notepad.exe 24696 Console 22,028 K
notepad.exe 25304 Console 5,852 K
explorer.exe 2864 Console 72,232 K

In the example above you can see the image name and the PID for each process. If you want
to kill the firefox process run:

C:\>Taskkill /IM firefox.exe /F

or
C:\>Taskkill /PID 26356 /F

The /f flag is kills the process forcefully. Failure to use the /F flag will result in nothing
happening in some cases. One example is whenever I want to kill the explorer.exe process I
have to use the /F flag or else the process just does not terminate.

If you have multiple instances of an image open such as multiple firefox.exe processes,
running the taskkill /IM firefox.exe command will kill all instances. When you specify the
PID only the specific instane of firefox will be terminated.

The real power of taskkill are the filtering options that allow you to use the following
variables and operators.

Variables:

• STATUS
• IMAGENAME
• PID
• SESSION
• CPUTIME
• MEMUSAGE
• USERNAME
• MODULES
• SERVICES
• WINDOWTITLE

Operators:

• eq (equals)
• ne (not equal)
• gt (greater than)
• lt (less than)
• ge (greater than or equal)
• le (less than or equal)

"*" is the wildcard.

You can use the variables and operators with the /FI filtering flag. For example, let's say you
want to end all processes that have a window title that starts with "Internet":

C:\>taskkill /FI "WINDOWTITLE eq Internet*" /F

How about killing all processes running under the Steve account:

C:\>taskkill /FI "USERNAME eq Steve" /F

It is also possible to kill a process running on a remote computer with taskkill. Just run the
following to kill notepad.exe on a remote computer called SteveDesktop:

C:\>taskkill /S SteveDesktop /U RemoteAccountName /P RemoteAccountPassword


/IM notepad.exe /F
To learn more about taskkill run it with the /? command just like any other Windows
command.

You might also like