ID EN
Socket

gethostname

Python 3.11

Return a string containing the hostname of the machine where the Python interpreter is currently executing.

Syntax

PYTHON
socket.gethostname()

See Also

auditing event gethostname() getfqdn() Availability