Last updated: Apr 4, 2024
Reading time·2 min

The error "'ping' is not recognized as an internal or external command, operable program or batch file" occurs when the system's PATH environment variable is not configured correctly on Windows.
To solve the error add %SYSTEMROOT%\system32 to your PATH environment
variable.



%SystemRoot%\system32 value at the top of the list
of environment variables.
%SystemRoot%\system32 variable, click on "New"
and add it.
%SystemRoot%usually isC:\Windows, so%SystemRoot%\system32is typically the same asC:\Windows\system32.

Click on "Ok" to confirm the changes.
Close your Command prompt application and then reopen it.
You might also have to restart your PC, but that's not always necessary.
Now you should be able to use the ping command.
Here is an example that pings the destination google.com.
ping google.com

If you want to ping the destination a specific number of times, use the /n
parameter.
ping /n 10 google.com
The command pings google.com 10 times.
You can look at other examples of using ping in
this section
of the docs.
You can learn more about the related topics by checking out the following tutorials: