Linux 修改host并生效

1.修改host

1.1 编辑hosts文件,命令: vi /etc/hosts
1.2 按照IP+网址,配置host
    
1.3 按"esc",再输入":wq",保存退出 (不保存退出是":q")

2.使host生效

2.1 重启网卡可以使host生效

2.2 重启linux服务器也可使host生效,命令:

猜你喜欢

转载自blog.csdn.net/weixin_43460193/article/details/124964724
今日推荐