PDF download Download Article
Different ways to connect with troubleshooting steps
PDF download Download Article

Do you need to connect to a wireless network on Linux? To do so, you need to have a network adapter that is compatible with Linux. Then, you can easily configure your wireless card using the graphical user interface or the Terminal. This wikiHow teaches you how to set up your wireless network in Linux, with expert tips from computer repair specialist Blain Gunter.

Connect to Wi-Fi Network on Linux

  • On most Linux distributions, you can click the Wi-Fi icon, select your network, enter the password, and click Connect .
  • To scan for Wi-Fi networks in the terminal, use "iwconfig <adapter name> scan".
  • To connect to a WPA network from the terminal, you'll need to create a configuration file that contains the wireless network name and password.
Section 1 of 6:

Setting Up Your Wireless Router

PDF download Download Article
  1. To do so, connect the internet cable to the "Internet" or "WAN" port on the back of your modem, then plug in your modem. The internet cable is the cable that carries the internet into your home. It may be an ethernet cable or a coaxial cable. It may be a cable that comes in from the outside, or there may be a wall outlet that you use to connect to the internet. [1]
    • If your wireless router and modem are not a single unit, use an ethernet cable to connect your router to one of the "LAN" ports on the back of your modem. Then, connect the other end of the ethernet cable to the "WAN" or "Internet" port on the back of your router.
  2. Initially, you'll need to use an ethernet cable so you can activate Wi-Fi. Connect an ethernet cable to one of the LAN ports on the back of the router. Then, connect it to an ethernet port on your PC.
    • If your PC does not have an ethernet port, you can buy an ethernet-to-USB adapter , which makes it possible to connect to a network through your USB port.
    Advertisement
  3. This opens your router's user interface. The IP address you use to open your router's interface differs from manufacturer to manufacturer. Consult the user's manual or manufacturer's web page to find the IP address for your router's make and model. [2]
    • Common router IP addresses include "192.168.1.1," "192.168.0.1," and "10.0.0.1". You may be able to find the IP address on a sticker on the back or bottom of your router.
  4. If you have not set an admin username and password for your router, you can use the default username and password. Consult the user's manual or your router to find the default username and password. There may also be a sticker with the default username and password on the back or bottom of your router. [3]
  5. The user interface is different from one router model to the next. Locate the wireless settings in the user interface and make sure wireless networking is enabled.
  6. When you enable wireless networking, you need to select an encryption method. The most common wireless encryption type is WPA, WPA2, or WPA3.
    • Do not use WEP encryption. WEP is an outdated encryption method that is incredibly easy to break . For the best security, make sure you use WPA encryptions.
  7. Advertisement
Section 2 of 6:

Connecting through the GUI

PDF download Download Article
  1. Computer repair specialist Blain Gunter notes that connecting to Wi-Fi on most Linux systems is similar to connecting on Windows or macOS—just click the Wi-Fi icon—typically resembling a fan with arching lines—at the upper-or lower-right corner of the screen, choose your Wi-Fi network, and enter the password.
  2. Look for an option in the drop-down menu that says "Enable Wi-Fi" or something similar, and ensure there is a checkmark next it. It should start scanning for nearby wireless networks.
  3. Once your wireless network is found, it should be listed below "Wi-Fi Networks." Click your wireless network to display the "Network Authentication Required" window, where you'll enter your Wi-Fi password..
    • If you do not see your wireless network, click More Networks to display additional wireless networks.
    • If you want to connect to a hidden network, click Connect to Hidden Wi-Fi Network instead. Then, enter the name of your wireless network and password.
    • Your Wi-Fi password is set up in the router's user interface. [4]
    • While this should work on desktop environments like KDE and GNOME, Gunter explains that all versions are different, and you may see different menu options.
  4. Advertisement
Section 3 of 6:

Connecting with Iwconfig

PDF download Download Article
  1. This displays a list of network adapters connected to your computer. Network adapters that say "no wireless extension" are not usable. Look for a wireless adapter that says "Mode: Managed" and "Access Point: Not-Associated" in the second line below the network adapter name.
  2. To do so, type sudo ifconfig [network adapter] up and press Enter . Replace [network adapter] with the name of your wireless network adapter.
  3. To do so, type iwlist [network adapter name] scan and press Enter . Replace "[network adapter name]" with the name of the network adapter you retrieved using the "iwconfig" command. This uses the network adapter to scan for nearby wireless networks and displays a list of all available wireless networks.
  4. Even though WEP is an outdated security encryption, it still exists. If your wireless network is a WEP network, enter the following command and press Enter to connect to the network. If you are using a WPA network, skip to the next step.
    • sudo iwconfig essid [network name] key [network password] . Replace [network name] with the network name or SSID, and replace [network password] with the password needed to connect to your network. If the network password is in ASCII format, you will need to put a "s:" in front of the password.
  5. If you are connecting to a WPA network, you will need to create a configuration file that contains the wireless network name and password. Enter the following command and press Enter to do so:
    • sudo wpa_passphrase [network name] [network password] > /etc/wpa_supplicant.conf . Replace [network name] with the name of the wireless network and replace [network password] with the password needed to connect to the network.
  6. To find a list of drivers that are available on your system, type wpa_supplicant and press Enter . Write down the name of the wireless driver you want to use below "Drivers."
  7. Once you have all the information you need, enter the following command and press Enter to connect to a WPA network: [5]
    • wpa_supplicant -i [network adapter] -c /etc/wpa_supplicant.conf -B -D [wireless driver]. . Replace [network adapter] with the name of your wireless network adapter, and replace [wireless driver] with the name of the wireless driver you wrote down.
  8. Advertisement
Section 4 of 6:

Connecting with Network Manager TUI

PDF download Download Article
  1. This opens the NetworkManager TUI window. [6]
  2. It's the second option in the NetworkManager TUI window. Use the arrow keys on your keyboard to navigate the menu options. Press Enter to select an option. [7]
  3. All wireless networks should be listed below "Wi-Fi." Highlight the wireless network you want to use and press Enter to select it. [8]
  4. If your password is correct, you should be connected to your wireless network. You can now use your wireless network to connect to the internet. [9]
  5. Advertisement
Section 5 of 6:

Connecting with Nmcli

PDF download Download Article
  1. This displays a list of network adapters connected to your computer. Network adapters that say "no wireless extension" are not usable. Look for a wireless adapter that says "Mode: Managed" and "Access Point: Not-Associated" in the second line below the network adapter name.
  2. To do so, type sudo ifconfig [network adapter] up and press Enter . Replace [network adapter] with the name of your wireless network adapter.
  3. Replace "[network adapter name]" with the name of the network adapter you retrieved using the "iwconfig" command. This uses the network adapter to scan for nearby wireless networks and displays a list of all available wireless networks.
  4. This is the start of the command used to connect to a wireless network. Do not press "Enter" just yet. You still need to enter the wireless network name and password. [10]
  5. Enter the name of the wireless network you want to connect to after "connect" in the command. Make sure the spelling matches the network name as displayed in the list of wireless networks from the previous command. [11]
  6. Replace "[password]" with your wireless password. Then press Enter . If your network name and password are correct, you should see a message informing you that your network adapter device was successfully activated. You can now use your network adapter to connect to the internet. [12]
  7. Advertisement
Section 6 of 6:

Troubleshooting

PDF download Download Article
  1. If you are having problems connecting to the internet, the first thing you should try is restarting your modem and/or router. To do so, unplug your modem and router for about 20 seconds. Plug your modem back in, wait a minute, then plug your router back in.
  2. If you cannot connect to the internet using any device, chances are the issue is with your internet service. Contact your internet service provider for assistance. If your Linux computer is the only device that can't connect to the internet, chances are the problem is with your computer software or hardware.
  3. Linux does not support all network adapters. You can use Google to see if your network adapter model is supported by Linux. Also, most Linux distributions keep a list of supported hardware. You can check to see what network adapters are supported for Ubuntu , Arch Linux , Fedora, and OpenSUSE .
    • Alternatively, you can use the Terminal command lshw -C network to see if Linux recognizes your network adapter. [13]
  4. Most network adapters that Linux supports use free and open-source drivers. However, not all manufacturers use free and open-source drivers. You can check the web page for your network adapter manufacturer to see if they have a Linux driver you can download and install. Some network adapters do not have a Linux driver.
    • If your network adapter does not have a Linux driver, you can try installing NDISWrapper on your Linux computer. NDISWrapper allows you to use the Windows driver for some network adapter models. [14]
    • Some network adapters may work with Linux, but not right out of the box. Some network adapters need additional configuration. If your network adapter does not work with Linux, you can use Google to check and see if anybody has figured out how to get it to work with Linux. You may find a solution on a Linux web forum or your Linux distribution's official website.
  5. If you cannot get your computer's built-in network adapter to connect to a wireless network, you can try an external network adapter that connects to your PC through USB. Before buying, check to ensure the network adapter is on your Linux distribution's list of supported devices. You can also check the network adapter's box to see if it has the Linux penguin logo indicating it supports Linux
  6. If NetworkManager is not installed on your version of Linux, connect your computer directly to your modem using an ethernet cable and use one of the following Terminal commands to install NetworkManager: [15] [16]
    • Debian/Ubuntu: sudo apt-get install network-manager
    • Fedora: sudo dnf install NetworkManager
    • Red Hat/CentOS: sudo yum install NetworkManager
    • Arch Linux: sudo pacman -S wpa_supplicant wireless_tools networkmanager
  7. If you just installed NetworkManager, you'll need to enter the Terminal command to start a new session. If you want Network Manager to start up every time you boot up your PC, you will need to enable it. Use the following Terminal commands to start and enable NetworkManager: [17]
    • Start NetworkManager: systemctl start NetworkManager
    • Enable NetworkManager: systemctl enable NetworkManager
  8. If NetworkManager is already installed, you may need to restart it if it's not working properly. You can use the following Terminal command to restart NetworkManager: sudo service NetworkManager restart
  9. If you have tried everything and you still can't get your Linux computer to connect to a wireless network, the last resort is to do a [{Install-Linux|clean installation]]. This will wipe all the data on your computer, so back up everything you want to keep before you begin. Then, you will need to make an installation CD or USB drive. Boot from the USB drive and follow the instructions to perform a clean installation of your Linux operating system.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Is there any software for Linux to use in a laptop as a WiFi signal-booster/repeater?
    Community Answer
    There is most likely no such software, as you wouldn't regularly find booster/repeater hardware inside of a device which uses Linux.
  • Question
    How can I update my Android App?
    Community Answer
    Updating applications is done from Play Store, where app initially downloaded from. If app wasn't downloaded from play store but from Unknown Source or unofficial store user can check the available versions from that source.Note: Avoid downloading from "Unknown Source" or external store. File you download may be modified and can gain access to critical/personal data on the device.
Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about troubleshooting computers and printers, check out our in-depth interview with Blain Gunter .

      About This Article

      Thanks to all authors for creating a page that has been read 448,049 times.

      Is this article up to date?

      Advertisement