语法格式
nmcli [参数]
常用参数:
d | 监控和管理网络设备的接口 |
---|---|
c | 监控和管理网络设备的连接 |
参考实例
显示所有连接的列表:
[root@linux265 ~]# nmcli con show
查看接口信息:
[root@linux265 ~]# nmcli device show
定义一个名字为default的新连接,它将使用DHCP通过eth0设备的以太网自动连接 :
[root@linux265 ~]# nmcli con add con-name "default" type ethernet ifname eth0
关闭自动连接:
[root@linux265 ~]# nmcli connection modify "static" connection.autoconnect no
添加DNS:
[root@linux265 ~]# nmcli connection modify team0 ipv4.dns 8.8.8.8
至此关于Linux常用命令nmcli命令的使用方法分享结束,大家如果对nmcli命令的使用方法还有问题可以通过评论区将问题提交我们。
以上就是
为各位朋友分享的 相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多 等着你 !