Simple wifi connection in Arch linux

Since we were able to rename our network interfaces, we still have access to the internet, but how? The simplest way I see is to do it through DHCP. Having as prior the information corresponding to the name of the Wi-Fi network that we have at home and the access password

We begin:

 

connect

ip addr it will give us again the name that we have placed on our interface. In my case I put the incredible name of Wireless.

We proceed to raise the interface with the command sudo ip link set wifi up

Wireless

This will bring up the interface.

We need to create a file in / etc called wpa_supplicant.conf.

sudo nano /etc/wpa_supplicant.conf  and we put the following code:

network = {ssid = "Network name" proto = RSN key_mgmt = WPA-PSK pairwise = CCMP TKIP group = CCMP TKIP psk = "network password"}

We press Control + or and then Control + x to save and exit the editor respectively:

wpa

Once out of the editor we proceed to run wpa_supplicant as follows

sudo wpa_supplicant -B -i wifi -c /etc/wpa_supplicant.conf

commandowpasupplicant

We have to wait approximately 2 seconds after entering the previous command and with dhcp we can now access the ip's assigned by the dhcp server in the following way:

sudo dhcpcd wifi

wifidhcp

This will end up giving us the access we need. Logically the easiest way to check it is to open a browser.

It should be noted that all the necessary programs already come with the arch linux installation so we do not need to install anything additional except for very specific cases of modules not supported by wpa_supplicant and that we must look for in the wiki of the module we have.

Another thing to note is that I have used wpa2 as encryption for the wifi connection so we need to check in our router that this encryption is available.

I hope you find it useful!

 


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

16 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   F3niX said

    You can also use wifi-menu from the console, at the time of installation you have it, but then in the installation you must install the package «dialog», I think it creates console windows for you to connect easily with wpa supplicant.

  2.   Germán said

    It is not much easier to use netctl wifi-menu which is the replacement of netcfg

    Excerpt from the link below
    The package containing netctl includes a wizard for Wi-Fi connections based on ncurses called Wi-Fi-menu

    http://portada.archlinux-es.org/225/netctl-llega-a-core/?utm_source=rss&utm_medium=rss&utm_campaign=netctl-llega-a-core

    1.    freebsddick said

      It depends on the point of view as I comment in the post ... It is only a personal appreciation .. There are many tools but in reality opting for this option is very easy with the addition that you know exactly where things come from .. It is also noteworthy that my post are only located in a minimalist environment and with the tools that we have at hand with the default installation provided by the arch linux iso

  3.   risketo said

    I have always used wifi-menu which is automatic.
    I have never had Wi-Fi problems at my house or at friends', but in libraries it is impossible for me to connect with arch, do you know why that could be?

  4.   eliotime3000 said

    I see that it requires more steps than when configuring your Wi-Fi network than doing the same procedure in console with Debian and / or CentOS / Fedora / RHEL.

    Well, I'll start with Slackware so I can get used to the KISS (Keep It Simple, Stupid!) Lifestyle.

    1.    freebsddick said

      Although what I publish is very useful, it has more than all an informative character focused on learning. There are always options that can be easier or more difficult, but in either case it only represents one more option.

      1.    eliotime3000 said

        For the moment, I will dedicate myself to using Slackware in order to get used to Arch's modus operandi, since it is not as automated as other distros (because you have to know how to handle the GNU Nano backwards and forwards and really for those who want to install it, really it tends to be a bucket of cold water for not getting used to the controls), nor does it have a stable edition or testing (at least in Slackware it gives you that option to use those editions of the repos in the same way that you do with Debian).

        Anyway, Arch is an excellent distro, but if one wants to handle it, one should at least go through Slackware (since at least, the configuration after formatting the hard disk is quite dynamic and at least it is quite clear and complete if the compared to Debian) and get more used to the commands you should use (because if you can't learn the basic commands, you might backfire when configuring a function).

  5.   msx said

    The netcfg method is more practical.

    1.    st0rmt4il said

      +1

    2.    eliotime3000 said

      Yes, well (I don't understand why they have to do the conversion from windowsers to linuxeros the most difficult way).

      1.    msx said

        I don't think I understand what you mean ...

  6.   gabux22 said

    Thanks for excellent help to the arch community ... it helped me and a lot ... 😀