How to Adjust Connection Settings using nmcli
To modify connection settings, you can use the following command:
Syntax:
nmcli connection modify <connection_name> <setting_name> <setting_value>
Here,
- connection_name: The name of the connection to be modified.
- setting_name: The specific setting to be adjusted.
- setting_value: The new value for the setting.
Example:
nmcli connection modify my_eth_connection ipv4.addresses "192.168.1.2/24" ipv4.gateway "192.168.1.1"
This example modifies the IPv4 settings of the “my_eth_connection” connection, setting a static IP address of “192.168.1.2” with a subnet mask of “/24” and a gateway of “192.168.1.1”.
Manage Network Connections From the Linux Command Line with nmcli
Network connectivity is a critical aspect of modern computing, and Linux provides a robust command-line tool for managing network connections: nmcli. Network Manager Command-Line Interface (nmcli) is a powerful and versatile utility that allows users to control and configure network settings directly from the terminal. In this article, we will delve into the syntax, usage, and various capabilities of nmcli for efficient network management on Linux.
Table of Content
- What is nmcli
- Syntax of nmcli
- Pratical Implementation of nmcli Command in linux
- 1. How to View Connections using nmcli
- 2. How to Check the Device Status using nmcli
- 3. How to Display Device Details using nmcli
- 4. How to Add a New Ethernet Conncection using nmcli
- 5. How to Adjust Connection Settings using nmcli
- Options Available in nmcli Command in Linux