BlueXIII's Blog

热爱技术,持续学习

0%

CentOS7下nmtui网络配置

nmtui文本图型界面

全称: NetworkManageTextUser Iterface

推荐做为首选配置方式

1
nmtui

nmcli纯文本界面

全称: NetworkManageCommandLine Interface

查看网络:

1
nmcli d 

常用参数:

1
2
3
4
5
6
7
g[eneral]       NetworkManager's general status and operations
n[etworking] overall networking control
r[adio] NetworkManager radio switches
c[onnection] NetworkManager's connections
d[evice] devices managed by NetworkManager
a[gent] NetworkManager secret agent or polkit agent
m[onitor] monitor NetworkManager changes

配置文件

1
2
3
4
5
6
7
vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=enp3s0
ONBOOT=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

其它

启停网络

1
2
ifdown enp0s3
ifup enp0s3

ip取代ifconfig

1
ip addr

ip与ifconfig的对应关系: