0
点赞
收藏
分享

微信扫一扫

hostname: Name or service not known

龙毓七七 2022-10-24 阅读 96


root@user-PC:~# hostname -i
hostname: Name or service not known

root@user-PC:~# vi /etc/hosts
10.170.200.148 node148

## 设置hostname
root@user-PC:~# hostnamectl --static set-hostname node148
## 再执行的hostname的时候就不会报错了.
root@user-PC:~# hostname -i
10.170.200.148
root@user-PC:~# hostname
node148

 

举报

相关推荐

0 条评论