redhat8中使用nmtui命令图形界面配置网络IP

 

0、查看系统

[root@localhost ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.5 (Ootpa)

 

1、在命令行终端直接输入:nmtui

[root@localhost ~]# nmtui

 

 

2、

选中Edit a connection,enter:

 

 

3、选中ens160,enter:

 

 

4、ipv4改为manual:

 

  

5、选择show,enter:

 

 

6、依次填写IP、子网掩码、网关、DNS服务

 

 

7、选择OK,enter:

 

 

8、选back,enter:

 

 

9、选择OK,enter:

 

 

10、重启网络服务,查看网络

[root@localhost ~]# nmcli c reload 
[root@localhost ~]# nmcli c up ens160 
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)
[root@localhost ~]# ifconfig | head
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.44  netmask 255.255.255.0  broadcast 192.168.3.255
        inet6 fe80::20c:29ff:fea6:911b  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:a6:91:1b  txqueuelen 1000  (Ethernet)
        RX packets 35  bytes 3750 (3.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 137  bytes 14364 (14.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

 

11、测试网络

[root@localhost ~]# ping -c 3 www.baidu.com

 

posted @ 2022-05-30 22:28  小鲨鱼2018  阅读(1622)  评论(0编辑  收藏  举报