hostname(1): hostname - set or print name of current host system

HOSTNAME(1) FreeBSD General Commands Manual HOSTNAME(1)


hostnameset or print name of current host system


hostname [-fs] [name-of-host]


The hostname utility prints the name of the current host. The super-user can set the hostname by supplying an argument; this is usually done in the initialization script /etc/rc.d/hostname, normally run at boot time. This script uses the hostname variable in /etc/rc.conf.
Include domain information in the printed name. This is the default behavior.
Trim off any domain information from the printed name.


The hostname command appeared in 4.2BSD.
December 7, 2006 FreeBSD 9.0


  1. System (20)
    1. FreeBSD (5)
    2. Linux (9)
  2. Email (2)
  3. DNS (2)
  4. Databases (1)
  5. WebServer (27)
Copyright © 2012-2015 HowToUnix - *nix Howtos and Tutorials
All Rights Reserved.