kingforce 发表于 2018-5-10 12:33:00

redhat7基本命令操作

沛屯丰邑>正文a) 网络管理器
  RHEL 7 安装有网络管理器,并处于启动状态
  #systemctl status NetworkManager.service
b) 查看网络接口
  #nmcli dev status
  查看网络接口。
c) 文本配置网络
  在如下路径,增加文件如ifcfg-enp0s3
  #/etc/sysconfig/network-scripts/
d) 图形化配置网络
  #nmtui
  启动图形化配置。
e) 启动网络
  #systemctl restart network.service
4. 主机名
  编辑文件
  /etc/hostname
  即可修改主机名。
  注:RedHat7之前,编辑/etc/sysconfig/network文件。
  Redhat7中使用命令 hostnamectlstatus 命令查看主机名
  #hostnamectl status
  此外也可以在
  #nmtui
  中设置主机名
5. 防火墙
  查看防火墙状态。
  #systemctl status firewalld
  临时关闭防火墙命令。重启电脑后,防火墙自动起来。
  systemctl stop firewalld
  永久关闭防火墙命令。重启后,防火墙不会自动启动。
  systemctl disable firewalld
  打开防火墙命令。
  systemctl enable firewalld
页: [1]
查看完整版本: redhat7基本命令操作