
You can’t ping ports, as Ping is using ICMP which doesn’t have the concept of ports. Ports belong to the transport layer protocols like TCP and UDP. However, you could use nmap to see whether ports are open or not:
nmap -p 80 example.com
The output will look like this:
nmap -p 80 google.de
Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-08 10:59 CET Nmap scan report for google.de (142.250.185.131) Host is up (0.017s latency). rDNS record for 142.250.185.131: fra16s50-in-f3.1e100.net PORT STATE SERVICE 80/tcp open http Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
Source: https://serverfault.com/questions/309357/ping-a-specific-port