How to Add a New Ethernet Conncection using nmcli
To add a new connection, you can use the following command:
Syntax:
nmcli connection add type <connection_type> ifname <interface_name> con-name <connection_name>
Here,
- connection_type: Specifies the type of connection (e.g., ethernet, wifi).
- interface_name: The name of the network interface.
- connection_name: A user-defined name for the new connection.
Example:
nmcli connection add type ethernet ifname eth1 con-name my_eth_connection
This command creates a new Ethernet connection named “my_eth_connection” associated with the network interface “eth1”. Adjust the interface name and connection name as needed.
To verify we can use this command “nmcli connection show”
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