Skip to content
Tcl Source Code Artifact [f85319059c]
Login

Artifact [f85319059c]

Artifact f85319059c4a2e68451ccdede029a8d1a26385f9e8487bd28830ade33a3db38d:


---
CommandName: Tcl_GetHostName
title: Tcl_GetHostName
ManualSection: 3
Version: 8.3
TclPart: Tcl
TclDescription: Tcl Library Procedures
Keywords:
 - hostname
Copyright:
 - Copyright (c) 1998-2000 Scriptics Corporation.
---

# Name

Tcl\_GetHostName - get the name of the local host

# Synopsis

::: {.synopsis} :::
**#include <tcl.h>**
[const char \*]{.ret} [Tcl\_GetHostName]{.ccmd} []{.cargs}
:::

# 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.