Linux 101 : Systemctl, nmcli and Network services
Displaying the network "systemctl" units:
The "-i" option in the grep command is used to ignore the uppercase, so "n" will be the same as "N"
Targets : are the equivalent of the "SysVinit" runlevels.
Networking-related operations:
We can restart the network components using:
We can check if the Networking is enabled (starts at boot time) using:
To reconnect an interface, we use the below:
To show the state of all the interfaces:
To create an Ethernet connection named "connection_1" assigned to the network interface "eth0", we use:
We can assign an IP addresses to our connection, using the below:
We replace "ip_addr" with the IP address relevant to our network.
After assigning the IP address to our connection, we would need to restart the connection to apply the changes to it, by deactivating and reactivating it as below.
Bringing down a network interface:
Bringing up a network interface:
Comments