## Tcl8.5.14/Tk8.5.14 Documentation > TclLib > GetHostName

### Tcl/Tk Applications | Tcl Commands | Tk Commands | Tcl Library | Tk Library

### NAME

Tcl_GetHostName - get the name of the local host

### SYNOPSIS

#include <tcl8.5/tcl.h>
const char *
Tcl_GetHostName()

### DESCRIPTION

Tcl_GetHostName is a utility procedure used by some of the Tcl commands. It returns a pointer to a string containing the name for the current machine, or an empty string if the name cannot be determined. The string is statically allocated, and the caller must not modify of free it.

### KEYWORDS

hostname
Copyright © 1995-1997 Roger E. Critchlow Jr. Copyright © 1998-2000 by Scriptics Corporation.