Red Hat Linux (RHEL) network interface configuration command

‮sptth‬://www.lautturi.com
Red Hat Linux (RHEL) network interface configuration command

To configure a network interface on Red Hat Enterprise Linux (RHEL), you can use the nmcli command, which stands for "Network Manager Command Line Interface". nmcli is a command-line tool that allows you to manage and configure network interfaces and network settings on RHEL.

Here are some examples of how you can use the nmcli command to configure a network interface on RHEL:

  • To list all network interfaces on your system, use the nmcli device command:
nmcli device
  • To view the current configuration of a specific network interface, use the nmcli connection show command and specify the name of the interface:
nmcli connection show eth0
  • To configure a static IP address for a network interface, use the nmcli connection modify command and specify the name of the interface, the IP address, and the netmask:
nmcli connection modify eth0 ipv4.addresses 10.0.0.100/24
  • To configure a default gateway for a network interface, use the nmcli connection modify command and specify the name of the interface and the IP address of the default gateway:
nmcli connection modify eth0 ipv4.gateway 10.0.0.1
  • To apply the changes you have made to a network interface, use the nmcli connection up command and specify the name of the interface:
nmcli connection up eth0

These are just a few examples of how you can use the nmcli command to configure a network interface on RHEL. Consult the documentation and online resources for more information and advanced usage of the nmcli command.

Created Time:2017-10-30 14:27:14  Author:lautturi