首頁 > 運維 > CentOS > 主體

centos重啟網卡的方法是什麼

藏色散人
發布: 2023-02-22 16:00:51
原創
17029 人瀏覽過

centos重啟網卡的方法:1、對於centos6的網卡重啟指令是「service network restart」;2、對於centos7的網卡重啟指令是「systemctl restart network」。

centos重啟網卡的方法是什麼

本教學操作環境:CentOS 7系統、Dell G3電腦。

centos重啟網卡的方法是什麼?

1、centos6的網路卡重新啟動方法:service network restart

  centos7的網路卡重新啟動方法:systemctl restart network

2、DNS設定檔:cat /etc/resolv.conf

設定主機和IP綁定資訊:cat /etc/hosts

設定主機名稱:cat /etc/hostname

3、可以使用nmtui文字方塊方式修改IP

4、關閉防火牆並設定開機不啟動

檢視防火牆狀態:

systemctl status firewalld.service
登入後複製

關閉:

systemctl stop firewalld
登入後複製

開啟:

systemctl start firewalld
登入後複製

開機自動關閉:

systemctl disable firewalld
登入後複製

開機自動啟動:

systemctl enable firewalld
登入後複製

查看開機是否啟動:

chkconfig --list|grep network(RHLE6)
登入後複製

5、暫時和永久關閉Selinux

#臨時關閉:

_getenforce
Enforcing
_setenforce 0
setenforce:SELinux is disabled
登入後複製

永久關閉:

_vim /etc/selinux/config
登入後複製

相關推薦:《Linux影片教學

以上是centos重啟網卡的方法是什麼的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!