1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages.zh/common/hostname.md

25 lines
367 B
Markdown
Raw Normal View History

2019-02-26 11:13:58 +08:00
# hostname
> 显示或设置系统的主机名。
> 更多信息:<https://manned.org/hostname>.
2019-02-26 11:13:58 +08:00
- 显示本机的主机名:
2019-02-26 11:13:58 +08:00
`hostname`
- 显示主机名的网络地址:
`hostname -i`
- 显示主机的所有网络地址:
`hostname -I`
- 显示 FQDN(完全限定域名):
`hostname --fqdn`
- 设置本机主机名:
2019-02-26 11:13:58 +08:00
`hostname {{新主机名}}`