hostname command

Display the fully qualified DNS hostname of the local system:

Read syntax diagramSkip visual syntax diagram
               .----------------------.     
               V .- - c ------------. |     
>>-hostname--+---+------------------+-+-+----------------------><
             |   |       (1)        |   |   
             |   +- - c ------------+   |   
             |   |       (1)        |   |   
             |   +- - g ------------+   |   
             |   |       (1)        |   |   
             |   +- - r ------------+   |   
             |   +- - s ------------+   |   
             |   +- - p --stackname-+   |   
             |   '- - d ------------'   |   
             +- - h --------------------+   
             '- - ? --------------------'   

Notes:
  1. Only one of the -c, -g, and -r parameters can be specified.