mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
497 B
Plaintext
26 lines
497 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# hostname
|
|
|
|
> Show or set the system's host name.
|
|
> More information: <https://www.gnu.org/software/inetutils/manual/inetutils.html#hostname-invocation>.
|
|
|
|
- Show current host name:
|
|
|
|
`hostname`
|
|
|
|
- Show the network address of the host name:
|
|
|
|
`hostname {{[-i|--ip-address]}}`
|
|
|
|
- Show the FQDN (Fully Qualified Domain Name):
|
|
|
|
`hostname {{[-f|--fqdn]}}`
|
|
|
|
- Set current host name:
|
|
|
|
`hostname {{new_hostname}}`
|