[Linux-CMD]CentOS7

2020-11-18  本文已影响0人  帅可儿妞
  1. 设置主机名
    hostnamectl set-hostname <host-name>

  2. 重启网络服务
    systemctl restart network

  3. 登出
    logout

  4. 查看网卡
    ip a

  5. 防火墙添加规则
    firewall-cmd --zone=public --add-port=<port>/tcp --permanent
    firewall-cmd --reload

  6. 关闭防火墙
    systemctl stop firewalld

上一篇下一篇

猜你喜欢

热点阅读