HomeManualTopicsTypesSymbols

std::gethostname

returns the hostname of the local computer

Parameters

None

Result

name
the hostname

Description

This function needs I/O-access rights.

Example

gethostname! $hostname println! hostname

Output

funky

Topic

POSIX

See also

std::sethostname sets the hostname of the local computer