Linxu网络常用命令(CentOS 7)

 命令 全称  作用 常用参数距离
nmcli network manager command line 查看所有网络设备和网络连接状态 nmcli d; nmcli device show; nmcli connection show
nmtui network manager text UI 网络管理器的文字终端UI 无
ifup interface up 启用网络设备  
ifdown interface down 关闭网络设备  
ifquery interface query    
dhclient dhcp client 自动配置DHCP服务器  
ip     ip address
ifconfig interface config 类似于ipconfig,但已被ip命令替代  
service   系统服务 service network restart 重启网络服务

 

配置地址及文件:

配置文件 作用
/etc/sysconfig/network-scripts/ifcfg-{interface name} 配置ip地址、DNS服务器
/etc/resolv.conf DNS服务器

 

参考链接:

https://superuser.com/questions/1282808/how-to-enable-network-adapter-in-centos7-minimal

https://superuser.com/questions/915536/centos-7-virtualbox-no-internet-access

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-networkmanager_tools

posted on 2021-04-19 22:31  hejing195  阅读(103)  评论(0)    收藏  举报

导航