In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you how to use the nmgli command in Linux. The content is simple and easy to understand. It is clearly organized. I hope it can help you solve your doubts. Let Xiaobian lead you to study and learn how to use the nmgli command in Linux.
The nmcl command is a command after redhat7 or centos7. This command can complete all configuration work on the network card, and can be written to the configuration file and take effect permanently.
Basic Usage nmcl [OPTIONS...] {help | general | networking | radio | connection | device | agent | monitor} [COMMAND] [ARGUMENTS...]
You can use TAB to complete commands, forget syntax, you can press TAB to see available options. If pressing TAB doesn't work, maybe there's no bash-completion installed.
#install bash-completion[root@localhost ~]# yum -y install bash-completion#logout log back in [root@localhost ~]# exit how to manage networks using nmcl tools in CentOS 7 how to manage networks using nmcl tools in CentOS 7
tab key View available options
View NetworkManager status:
[root@localhost ~]# nmcli general status STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN connected full enabled enabled enabled enabled
List connection profile information:
[root@localhost ~]# nmcli connection show NAME UUID TYPE DEVICE enp0s3 5005942f-a7fd-4e55-b8e7-77928d8da72d ethernet enp0s3
Display the status of the network card:
[root@localhost ~]# nmcli device status DEVICE TYPE STATE CONNECTION enp0s3 ethernet connected enp0s3 lo loopback unmanaged --How to manage networks using nmgli tools in CentOS 7 How to manage networks using nmgli tools in CentOS 7
You can start or stop a network card using the nmgli command line, which is equivalent to ifup/ifdown.
Stop Network Card: [root@localhost ~]#nmcl device disconnect enp0s3 How to use nmcl tool to manage network in CentOS 7 How to use nmcl tool to manage network in CentOS 7 Open NIC: [root@localhost ~]#nmcl device disconnect enp0s3 How to use nmcl tool to manage network in CentOS 7 How to use nmcl tool to manage network in CentOS 7 Modify NIC information, from dhcp automatic acquisition to manual addition of address: [root@localhost ~]#nmcl connection modify enp0s3 ipv4.method manual ipv4.addresses 192.168.0.110/24 ipv4.dns 192.168.0.1 202.102.128.68[root@localhost ~]#nmcl connection up enp0s3 How to use nmcl tools to manage networks in CentOS 7 How to use nmcl tools to manage networks in CentOS 7
View network card configuration file information
Add additional IP[root@localhost ~]#nmcl connection modify enp0s3 +ipv4.addresses 192.168.0.108/24# Enable configuration file [root@localhost ~]#nmcl connection up enp0s3#View ip address [root@localhost ~]# ip add show enp0s32: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:7b:d3:32 brd ff:ff:ff:ff:ff:ff inet 192.168.0.107/24 brd 192.168.0.255 scope global noprefixroute enp0s3 valid_lft forever preferred_lft forever inet 192.168.0.108/24 brd 192.168.0.255 scope global secondary noprefixroute enp0s3 valid_lft forever preferred_lft forever inet6 fe80::d4d9:9043:1056:9e1a/64 scope link noprefixroute valid_lft forever preferred_lft forever delete extra IP[root@localhost ~]#nmcl connection modify enp0s3 -ipv4.addresses 192.168.0.108/24# enable configuration file [root@localhost ~]#nmcl connection up enp0s3#view ip address [root@localhost ~]# ip ad show enp0s32: enp0s3: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:7b:d3:32 brd ff:ff:ff:ff:ff:ff inet 192.168.0.107/24 brd 192.168.0.255 scope global noprefixroute enp0s3 valid_lft forever preferred_lft forever inet6 fe80::d4d9:9043:1056:9e1a/64 scope link noprefixroute valid_lft forever preferred_lft forever The above is "How to use the nmgli command in Linux" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.