Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

hostname

Set or print the name of the current host system

Syntax:

hostname [-s] [name_of_host]

Options:

-s
Trim off any domain information from the printed name.
name_of_host
The name to be given to the current host system.

Description:

When the system starts, it initializes the hostname. As superuser, you can use the hostname utility to change the hostname.

Without a name_of_host argument, hostname prints the name of the current host.


Note: This utility sets or gets the value of the _CS_HOSTNAME configuration string, not that of the HOSTNAME environment variable.

See also:

gethostname() in the Library Reference


[Previous] [Contents] [Index] [Next]