ID EN
Socket

sethostname

Python 3.11

Set the machine’s hostname to name. This will raise an OSError if you don’t have enough rights.

Syntax

PYTHON
socket.sethostname(name)

See Also

OSError auditing event Availability