美文网首页
网卡设置、服务启动、selinux启动关闭

网卡设置、服务启动、selinux启动关闭

作者: 夜明一 | 来源:发表于2018-08-05 00:17 被阅读0次

nmtui

使用这个命令可以更简单的设置网卡,而却不用安装,但是我依然不推荐,因为如果再次接触的centos7或者是ubuntu时候你会依赖上这个命令,所以在我的知识体系中已经遗忘了这个命令。

# systemctl restart network   //重启网卡的命令就是这个

手动修改网卡

# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736

这个才是我最喜欢的centos网卡修改方式。至于修改方式的主要格式我在之前的文章里已经详细说明,这里就不再介绍。

centos7服务开关,查看等

启动服务

# systemctl start server.name

停止服务

# systemctl stop server.name

查看是否开机开启服务

# chkconfig --list|grep server.name

开机启动

# systemctl enable server.name

关闭开机启动

# systemctl disable server.name

临时开启关闭selinux

查看selinux状态

# getenforce

注:enable 开启,disable 关闭。

临时关闭

# setenforce 0

相关文章

网友评论

      本文标题:网卡设置、服务启动、selinux启动关闭

      本文链接:https://www.haomeiwen.com/subject/fnuvvftx.html