← 返回命令列表

Linux command

nmcli-connection 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

nmcli connection

Activate

nmcli connection up uuid

Deactivate

nmcli connection down uuid

Example

nmcli connection add ifname eth0 type ethernet ipv4.method auto ipv6.method auto

Example

nmcli connection add ifname eth0 type ethernet ip4 10.0.0.7/8 gw4 10.0.0.1 ipv4.dns 10.0.0.1

Example

nmcli connection add ifname eth0 type ethernet ip6 2001:db8::2/64 gw6 2001:db8::1

Example

nmcli connection import type openvpn file vpn_config.ovpn

说明

nmcli connection manages NetworkManager connection profiles. It can list, activate, deactivate, create, modify, and delete network connection configurations including Ethernet, Wi-Fi, VPN, and other connection types.

FAQ

What is the nmcli-connection command used for?

nmcli connection manages NetworkManager connection profiles. It can list, activate, deactivate, create, modify, and delete network connection configurations including Ethernet, Wi-Fi, VPN, and other connection types.

How do I run a basic nmcli-connection example?

Run `nmcli connection` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more nmcli-connection examples?

This page includes 7 examples for nmcli-connection, plus related commands for nearby Linux tasks.