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:
nmcli device
command:nmcli device
nmcli connection show
command and specify the name of the interface:nmcli connection show eth0
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
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
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.