How to get the hostname of the node?

How to get the hostname of the node running the program?

asked Apr 1 by zma (2,240 points)
edited Apr 5 by zma

5 Answers

answered Apr 4 by zma (2,240 points)
edited May 29 by SA

Another way:

cat /proc/sys/kernel/hostname
commented Apr 9 by zma (2,240 points)

Related questions

4 answers
7 answers
asked Mar 31 by zma (2,240 points)
5 answers
asked Mar 31 by zma (2,240 points)
Welcome to Do This In Various Langs (dtivl), where you can ask questions and receive solutions in various programming languages.
Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...