info hostname
Gives the name of the host, or localhost.
info hostname
Description
An interpreter with the capability socket or env gets the node name of the machine on Linux, macOS, and FreeBSD. Each other interpreter, and each interpreter on Windows, gets localhost, so a script with no capability reads no fact of the host.
Returns
A host name.
Examples
% info hostname
localhost
Errors
% info hostname x
wrong # args: should be "info hostname"
-errorcode TCL WRONGARGS
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1