[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ping



On Sun, 13 Nov 2022 06:13:38 -0800
peter@easthope.ca wrote:

> root@joule:/home/root# /bin/ping -c 3  192.168.0.12
> PING 192.168.0.12 (192.168.0.12) 56(84) bytes of data.
> 64 bytes from 192.168.0.12: icmp_seq=1 ttl=64 time=0.079 ms
> 64 bytes from 192.168.0.12: icmp_seq=2 ttl=64 time=0.114 ms
> 64 bytes from 192.168.0.12: icmp_seq=3 ttl=64 time=0.113 ms
> 
> --- 192.168.0.12 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 2041ms
> rtt min/avg/max/mdev = 0.079/0.102/0.114/0.016 ms
> root@joule:/home/root# echo $PATH
> /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
> root@joule:/home/root# which ping
> /bin/ping
> root@joule:/home/root# ping -c 3  192.168.0.12
> 
> No response.

What system are you running? I am running pretty much standard Debian
11, and I notice these differences:

You appear to have root's home at /home/root. Mine is at /root, and I
have no /home/root.

root@jhegaala:~# cd
root@jhegaala:~# pwd
/root
root@jhegaala:~# ll /home/
total 28
drwxr-xr-x  4 root    root     4096 Oct 10  2021 ./
drwxr-xr-x 19 root    root     4096 Oct 19 06:27 ../
drwxr-xr-x 50 charles charles  4096 Nov 10 08:00 charles/
drwx------  2 root    root    16384 Oct 10  2021 lost+found/
root@jhegaala:~# 


which finds ping at /usr/bin/ping.

root@jhegaala:~# which ping
/usr/bin/ping
root@jhegaala:~#

although the two are the same:

root@jhegaala:~# ls -i /bin/ping /usr/bin/ping
7607442 /bin/ping  7607442 /usr/bin/ping
root@jhegaala:~# 


I get a different response when I try to execute a program that the
shell cannot find.

root@jhegaala:~# foo
-bash: foo: command not found
root@jhegaala:~# 

And, of course, I have no problem running ping without specifying a
full path to the executable.

root@jhegaala:~# ping -c 3 chaffee
PING chaffee.localdomain (192.168.100.30) 56(84) bytes of data.
64 bytes from chaffee.localdomain (192.168.100.30): icmp_seq=1 ttl=64 time=1.33 ms
64 bytes from chaffee.localdomain (192.168.100.30): icmp_seq=2 ttl=64 time=1.99 ms
64 bytes from chaffee.localdomain (192.168.100.30): icmp_seq=3 ttl=64 time=3.15 ms

--- chaffee.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.334/2.157/3.153/0.752 ms
root@jhegaala:~# 




-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: