← 返回命令列表

Linux command

nm-settings 命令

文本

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

常用示例

View connection settings

nmcli connection show [connection_name]

Set IPv4 address

nmcli connection modify [conn] ipv4.addresses "[192.168.1.10/24]"

Set DNS servers

nmcli connection modify [conn] ipv4.dns "[8.8.8.8 8.8.4.4]"

Set gateway

nmcli connection modify [conn] ipv4.gateway "[192.168.1.1]"

Set to static IP

nmcli connection modify [conn] ipv4.method manual

说明

nm-settings describes the properties available for NetworkManager connections. These settings are configured via nmcli, nm-connection-editor, or directly in keyfiles. Settings are organized by category (connection, ipv4, ipv6, wifi, etc.).

参数

connection.id
Connection name.
connection.type
Connection type.
ipv4.method
auto, manual, disabled.
ipv4.addresses
IP addresses.
ipv4.dns
DNS servers.
802-11-wireless.ssid
WiFi network name.

FAQ

What is the nm-settings command used for?

nm-settings describes the properties available for NetworkManager connections. These settings are configured via nmcli, nm-connection-editor, or directly in keyfiles. Settings are organized by category (connection, ipv4, ipv6, wifi, etc.).

How do I run a basic nm-settings example?

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

What does connection.id do in nm-settings?

Connection name.