(!) ?Discussion

Как настроить WiFi

На этой странице расписано как конфигурировать WiFi интерфейс в Debian.

Если ваше устройство имеет беспроводной интерфейс (контролируемый утилитой iwconfig), он должен быть конфигурирован для подключения к интернету. Если у вас отсутствует интерфейс для устройства, пожалйуста посетите WiFi для получения информации о установке драйвера.

Беспроводной интерфейс может быть настроен с помощью менеджера соединения (например, NetworkManager) или через /etc/network/interfaces с помощью специальных утилит (например, wpa_supplicant). Настройки NetworkManager и wpa_supplicant приведены ниже.

<!> Алгоритм WEP небезопасен, устарел после появления WPA. Использование WEP не рекоменовано и не описано в данной статье.


NetworkManager настраивается через через графический интерфейс, доступный для GNOME и KDE. Интерфейс не должен быть настроен в файле /etc/network/interfaces.

!Также NetworkManager является интерфейсом для wpa_supplicant.


  1. Убедитесь, что пользователь входит в группу netdev.

  2. Установите пакет:network-manager-gnome:

    $ su
    # aptitude update
    # aptitude install network-manager-gnome
  3. Выйдите (Log out) из GNOME, затем вернитесь.
  4. Новый апплет (иконка-компьютер) будет в области оповещения / системном трее. Left-click this icon to present the nm-applet pop-up menu.
  5. Ближайшие беспроводный сети с распространяемым SSID будут показаны:
    • Выберите требуемую беспроводную сеть и кликните по ней.
    • Если используется WPA-шифровка с паролем (т. н. passphrase/pre-shared key), вам будет предложено ввести его. После выполнения, нажмите на "Connect".
    • Через небольшое время сеть активируется.
    Если желаемая сеть не показано ("спрятанная" сеть):
    • Нажмите "Connect to Other Wireless Network...".
    • Введите SSID вашей сети "Network Name".
    • Если используется шифровка, выберите метод из раскрывающегося меню "Wireless Security" (чаще всего "WPA Personal" или "WPA2 Personal").
      • Введите пароль в поле "Password".
    • Надмите "Connect" для активации беспроводной сети.

See the NetworkManager page for frequently asked questions, documentation and support references.


  1. Ensure your user account is a member of the netdev group.

  2. Install the network-manager-kde package:

    $ su
    # aptitude update
    # aptitude install network-manager-kde
  3. From the K Menu, select "Run Command". Enter "knetworkmanager" and click "Run".
  4. A new applet (wallplug/socket icon) will appear in the system tray. Right-click this icon to present the KNetworkManager pop-up menu.
  5. Neighboring wireless networks with a broadcasted SSID should be listed:
    • Click on the desired network's name.
    • If the network uses WPA encryption with a password (aka passphrase/pre-shared key), you will be prompted to enter it. After providing, click the "Connect" button.
    • The wireless network connection will be activated.
    If the desired network is not listed (e.g. SSID not broadcast/hidden):
    • Click "Connect to Other Wireless Network...".
    • Enter the network's name in "Name (ESSID)".
    • Tick "Use Encryption" if in use on the network.
      • Select the encryption method used (usually "WPA Personal").
      • Enter the passphrase/pre-shared key at "Password".
      • Select "WPA 1" or "WPA 2" for the protocol version, as used by the network.
    • Click the "Connect" button to activate the wireless network connection.

See the NetworkManager page for frequently asked questions, documentation and support references.

Other GUI

The network-manager-kde package will work for icewm and Xfce too

wicd - for Xfce, LXDE, Fluxbox

wicd (Wireless Interface Connection Daemon) is an alternative to NetworkManager. It is environment independent, making it a perfect replacement for other desktop environments (e.g. Xfce, LXDE, Fluxbox, etc.). Like NetworkManager, wicd is configured via a graphical interface. Your wireless interface should not be referenced within Debian's /etc/network/interfaces file.

Lenny users: wicd is not included in Lenny, but is available as a backported package. Configure /etc/apt/sources.list as explained in the Backports page before continuing.

  1. Update the list of available packages and install the wicd package:

    $ su
    # aptitude update
    # aptitude install wicd
  2. Amend /etc/network/interfaces to contain only the following:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    # The loopback network interface
    auto lo
    iface lo inet loopback
  3. If not already performed, add your regular user account to the netdev group and reload DBus:

    # adduser yourusername netdev
    # /etc/init.d/dbus reload
  4. Start the wicd daemon:

    # /etc/init.d/wicd start
  5. Start the wicd GUI with your regular user account: 

    # exit
    $ wicd-client -n

See also wicd frequently asked questions.


wpa_supplicant is a WPA client and IEEE 802.1X supplicant.

The wpasupplicant package provides wpa-* ifupdown options for /etc/network/interfaces. If these options are specified, wpa_supplicant is started in the background when your wireless interface is raised and stopped when brought down.

Before continuing, install the wpasupplicant package:


{i} Also known as "WPA Personal" and "WPA2 Personal" respectively.

  1. Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure:

    # chmod 0600 /etc/network/interfaces
  2. Open /etc/network/interfaces in a text editor:

    # sensible-editor /etc/network/interfaces
  3. Define appropriate stanzas for your wireless interface, along with the SSID and PSK. For example:

    auto wlan0
    iface wlan0 inet dhcp
        wpa-ssid mynetworkname
        wpa-psk mysecretpassphrase
    The "auto" stanza will bring your interface up at system startup. If not desired, remove or comment this line.
  4. Save the file and exit the editor.
  5. Bring your interface up. This will start wpa_supplicant as a background process.

    # ifup wlan0

Additional wpa-* options are described within /usr/share/doc/wpasupplicant/README.modes.gz. This should also be read if connecting to a network not broadcasting its SSID.

For general /etc/network/interfaces information, see the interfaces(5) man page.


For networks using EAP-TLS, you are required to establish a wpa_supplicant configuration file and provide the client-side certificate. An example WPA2-EAP configuration file can be found at /usr/share/doc/wpasupplicant/examples/wpa2-eap-ccmp.conf.

Once available, reference your configuration file in /etc/network/interfaces. For example:

More information can be found in the wpa_supplicant.conf(5) man page. A fully-commented wpa_supplicant configuration file example is at /usr/share/doc/wpasupplicant/README.wpa_supplicant.conf.gz.

Switching Connections

To switch between multiple distinct configurations:

Security consideration

  1. Every member of a network can listen to other members' traffic. (whether it's an unencrypted public hot-spot, or a WEP/WPA/WPA2, or LAN). Use SSL/TLS protocols (https, imaps...) or VPN to preserve your privacy.

  2. WEP is so insecure that it is basically equivalent to not using any encryption at all.
  3. WPA 1 is deprecated. Use WPA2 instead.

  4. Make sure you use strong pass-phrase.

Network security, see:

See Also

CategoryNetwork | CategoryWireless