hostnamectl 主机名管理
1、hostnamectl 主机名管理
hostnamectl --help 查看帮助信息

2、常用的命令:
查看
hostnamectl status 整体信息
hostnamectl --static 静态主机名
hostnamectl --transient 瞬间主机名
hostnamectl --pretty 灵活主机名
设置
hostnamectl status 查看当前的主机名相关信息
hostnamectl set-hostname ceshi.com 设置主机名为ceshi.com
hostnamectl set-icon-name ceshi.com
hostnamectl --pretty set-hostname ceshi.com

3、涉及文件
/etc/hostname
/etc/sysconfig/network
/etc/hosts

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:101
阅读量:52
阅读量:78
阅读量:113
阅读量:135