The ping command is used to test the ability of the source computer to reach a specified destination computer. It sends Internet Control Message Protocol (ICMP) Echo request messages to the destination computer and waits for a response.