this post was submitted on 31 Oct 2023
2 points (75.0% liked)
Guix
316 readers
1 users here now
Guix is an advanced distribution of the GNU operating system developed by the GNU Project
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It appears that this is actually a Bash thing rather than a Guile thing:
https://superuser.com/questions/132489/hostname-environment-variable-on-linux
For more information about why, see the comment in this other answer which mentions that
HOSTNAME
is not required for POSIX compliance:https://superuser.com/questions/132489/hostname-environment-variable-on-linux/132500#132500
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html
Curiously, I can reproduce this on my Guix System, but actually not on my Fedora system (where it is exported automatically), so I guess some distros choose to explicitly export the
HOSTNAME
variable?