By default ping will only ping 5 times!?!?

If this is an issue specific to nixpkgs should I open a github issue there?

I’ve read the entire manpage on this platform, it states ping comes from iputils. I can’t even find a flag to pass to fix this. -c 0 spits this error message:

ping: invalid argument: '0': out of range: 1 <= value <= 9223372036854775807

In my experience on every linux platform ever ping will run until told to quit by the user, however on NixOS the default action is to stop after icmp_seq reaches 5?

This is absolutely baffling and seriously hamstring my ability to troubleshoot a friend’s network at the moment. I can set -c 9223372036854775807 I suppose, but I don’t want to do this, I want ping to run until I tell it to stop.

That’s odd. The ping I get from iputils-20221126 out of the nixos-23.11 channel doesn’t stop after 5. Where is your ping coming from?

Same here, what is the output of:

realpath -- $(which ping)
ping -V
alias ping
type ping

On my system:

❯ realpath -- $(which ping)
❯ ping -V
ping from iputils 20221126
libcap: yes, IDN: yes, NLS: yes, error.h: yes, getrandom(): yes, __fpending(): yes
❯ alias ping
 ~ │ ✘ 1
❯ type ping
ping is /run/current-system/sw/bin/ping

You can likely use type -a ping to see the full sequence of potential resolutions.

What in the hell, it’s aliased to -c 5

> alias ping
ping='ping -c 5'
> type ping
ping is an alias for ping -c 5
> ping -V
ping from iputils 20240117
libcap: yes, IDN: yes, NLS: yes, error.h: yes, getrandom(): yes, __fpending(): yes
> unalias ping
alice@nixos:pts/0->/home/alice (0) 
> ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=117 time=41.5 ms
64 bytes from icmp_seq=2 ttl=117 time=28.3 ms
64 bytes from icmp_seq=3 ttl=117 time=66.9 ms
64 bytes from icmp_seq=4 ttl=117 time=27.7 ms
64 bytes from icmp_seq=5 ttl=117 time=36.2 ms
64 bytes from icmp_seq=6 ttl=117 time=34.2 ms
64 bytes from icmp_seq=7 ttl=117 time=25.0 ms
64 bytes from icmp_seq=8 ttl=117 time=25.3 ms
64 bytes from icmp_seq=9 ttl=117 time=29.6 ms

It comes back when I open a new shell session, so it must be a zsh theme I’ve installed or something. I didn’t even think about this, it’s not something I would ever want or do. Thanks so much for giving me the few commands necessary to figure it out.

To close the loop this was due to the omz 'systemadmin" plugin. This was included in my conf because I simply copied the zsh/omz config out of the wiki without reading the plugin contents. Always something to be wary of.