İçeriğe geç

Configure WiFi Connections

Establish a Wireless Connection

This section will show how to establish a wifi connection to the wireles network. Note that directly connecting will implicitly create a connection (that can be seen with “nmcli c”). The naming of such will follow “SSID N” pattern, where N is a number.

First, determine the name of the WiFi interface:

$ nmcli d
DEVICE             TYPE      STATE         CONNECTION
wlan0              wifi      disconnected     --

Make sure the WiFi radio is on (which is its default state):

$ nmcli r wifi on

Then, list the available WiFi networks:

$ nmcli d wifi list
   my_wifi      Infra  5     54 Mbit/s  89      ▂▄▆█  WPA2

As an example, to connect to the access point ‘my_wifi’, you would use the following command:

$ nmcli d wifi connect my_wifi password <password>

<password> is the password for the connection which needs to have 8-63 characters or 64 hexadecimal characters to specify a full 256-bit key.

Connect to a Hidden Network

A hidden network is a normal wireless network that simply does not broadcast it’s SSID unless solicited. This means that its name cannot be searched and must be known from some other source.

Issue the following command to create a connection associated with a hidden network <ssid>:

$ nmcli c add type wifi con-name <name> ifname wlan0 ssid <ssid>
$ nmcli c modify <name> wifi-sec.key-mgmt wpa-psk wifi-sec.psk <password>

Now you can establish a connection by typing:

$ nmcli c up <name>

<name> is an arbitrary name given to the connection and <password> is the password to the network. It needs to have between 8-63 characters or 64 hexadecimal characters in order to specify a full 256-bit key.

Further Information

You will find further information and more detailed examples on following pages:

Setting Up WiFi

There is a tool called WPA_CLI which can be used to create and manage wifi networks.
First execute


the output will be an integer. This is the network number. (In my case it was 2)
now run

set_network 2 ssid “your network name”

set_network 2 psk “your password”


select network 2

Now its connected to our network but it may not get the IP address. To get the IP address, execute


Now check the IP address,


If you got the IP, Congrates everything is done!! Now have fun!!


İlk Yorumu Siz Yapın

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir