tldr/pages/common/hostname.md

25 lines
381 B
Markdown
Raw Normal View History

2015-12-15 16:57:07 +00:00
# hostname
> Show or set the system's host name.
> More information: <https://manned.org/hostname>.
2015-12-15 16:57:07 +00:00
- Show current host name:
2015-12-15 16:57:07 +00:00
`hostname`
- Show the network address of the host name:
2015-12-15 16:57:07 +00:00
`hostname -i`
- Show all network addresses of the host:
2015-12-15 16:57:07 +00:00
`hostname -I`
- Show the FQDN (Fully Qualified Domain Name):
2015-12-15 16:57:07 +00:00
`hostname --fqdn`
- Set current host name:
2015-12-15 16:57:07 +00:00
`hostname {{new_hostname}}`