Sunday, December 18, 2016

Usage of NMCLI command

nmcli is a useful commandline tool on linux based systems to deal with the Network Manager without using GUI. In this post, I'm leaving some of my short notes about using it for connecting to WiFi networks.

Quickly check whether we are connected to the network using any
available device

# nmcli device status

check all the currently available connections

# nmcli connection show

turn off and on wifi

# nmcli radio wifi off
# nmcli radio wifi on


rescan for the available wifi networks

# nmcli device wifi rescan

list all the available wifi networks

# nmcli device wifi list

connect to a specific wifi network identified by ESSID ('eduroam' in this example)

# nmcli connection up eduroam

delete an existing connection from the network manager

#nmcli connection delete 3Com

connect to a wifi network

# nmcli device wifi connect 3Com password '1234'

adding a new connection information

# nmcli connection add type wifi con-name Asanka-WiFi ifname wlp1s0 ssid eduroam

That's it!

No comments:

Post a Comment