2015-12-15 16:57:07 +00:00
|
|
|
# hostname
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Show or set the system's host name.
|
2015-12-15 16:57:07 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show current host name:
|
2015-12-15 16:57:07 +00:00
|
|
|
|
|
|
|
`hostname`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show the network address of the host name:
|
2015-12-15 16:57:07 +00:00
|
|
|
|
|
|
|
`hostname -i`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show all network addresses of the host:
|
2015-12-15 16:57:07 +00:00
|
|
|
|
|
|
|
`hostname -I`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Show the FQDN (Fully Qualified Domain Name):
|
2015-12-15 16:57:07 +00:00
|
|
|
|
|
|
|
`hostname --fqdn`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Set current host name:
|
2015-12-15 16:57:07 +00:00
|
|
|
|
|
|
|
`hostname {{new_hostname}}`
|