关于 ubuntu 的 nmcli 问题

关于 ubuntu 的 nmcli 问题

当我输入 nmcli con 时,它会给我一个所有以前连接的列表,我该如何删除它显示的这些过去的连接

 Nmcli delete cents --- doesn't work

 Nmcli --delete uuid --- doesn't work

答案1

语法(至少对于nmcli1.2.4 版本)是

nmcli delete [id | uuid | path] ID...

即单词delete(不带前导)后跟或或--之一,后跟该字段的值iduuidpath

例如

$ nmcli con
NAME                UUID                                  TYPE             DEVICE 
Wired connection 1  9340c518-13a2-32c0-ae96-8790600dee2a  802-3-ethernet   --   

然后

$ nmcli con delete uuid 9340c518-13a2-32c0-ae96-8790600dee2a
Connection 'Wired connection 1' (9340c518-13a2-32c0-ae96-8790600dee2a) successfully deleted.

相关内容