Fedora Command Line Networking

Sunday, April 14, 2019

Networking from the Fedora 29 command line.

NetworkManager is a GUI, nmcli is the command line application for NetworkManager.
Typing nmcli and hitting return or enter provides information about devices, their addresses, and DNS configuration.
$ nmcli
Typing nmcli [tab] [tab] will give the information about what options are available for nmcli.
$ nmcli [tab][tab]
Remember [tab] [tab] after the command is your friend and will show appropriate options.
Entering nmcli device and nmcli device status will return the same information about network devices and their connection state.
$ nmcli device
$ nmcli device status
Entering nmcli connection show provides an even more detailed view of the devices and their connection state.
$ nmcli connection show
To enable an existing connection:
# nmcli connection up [NAME]
To disable an existing connection:
# nmcli connection down [NAME]

Talking about wireless or wifi

Entering nmcli radio will display various wifi devices.
So, nmcli radio wifi will display the wifi status, and nmcli radio wifi on or nmcli radio wifi off will enable or disable the radio.
$ nmcli radio wifi
# nmcli radio wifi on
# nmcli radio wifi off
To see a list of wireless networks:
$ nmcli device wifi list
To connect:
# nmcli device wifi connect [SSID] password [PASSWORD]
A helpful 1 liner:
$ nmcli -f in-use,ssid,bssid,rate,signal,bars dev wifi