You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hostname command is not part of bash by default. It seems like some distros deliver the variable $HOSTNAME instead. For those distros (like mine Arch Linux) it may be better to change
Interesting, I always assumed that hostname was available everywhere. It is not a bash-builtin, but a binary. I guess we could change it to uname -n, which should be POSIX.
I personally find $HOSTNAME not very robust. It is a variable and as such users/admins could change it.
Hi:
The
hostname
command is not part of bash by default. It seems like some distros deliver the variable$HOSTNAME
instead. For those distros (like mine Arch Linux) it may be better to changeOr a more elaborated alternative that attempts to use the right version like:
or similar (I am sure it may be a much better alternative)
The text was updated successfully, but these errors were encountered: