Arch Linux
Ethernet works, but wifi does not
I first tried to connect to mariposa3 router with wifi-menu -0
but got this error:
Job for netctl@wlp5s0\x2dmariposa3.service failed because the control process exited with error code. See "systemctl status "netctl@wlp5s0\\x2dmariposa3.service"" and "journalctl -xe" for details.
so tried to connect to other router called mariposa and again it does not work.
I also tried to get the following information, but am unable to understand what shoukd be done
«systemctl status «netctl@wlp5s0\\x2dmariposa3.service» gives:
systemctl status "netctl@wlp5s0\\x2dmariposa3.service" ● netctl@wlp5s0\x2dmariposa3.service - Networking for netctl profile wlp5s0-mariposa3 Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2017-02-17 05:49:47 ART; 4min 19s ago Docs: man:netctl.profile(5) Process: 1104 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE) Main PID: 1104 (code=exited, status=1/FAILURE) Feb 17 05:49:47 F systemd[1]: Starting Networking for netctl profile wlp5s0-mariposa3. Feb 17 05:49:47 F network[1104]: Starting network profile 'wlp5s0-mariposa3'. Feb 17 05:49:47 F network[1104]: The interface of network profile 'wlp5s0-mariposa3' is already up Feb 17 05:49:47 F systemd[1]: netctl@wlp5s0\x2dmariposa3.service: Main process exited, code=exited, Feb 17 05:49:47 F systemd[1]: Failed to start Networking for netctl profile wlp5s0-mariposa3. Feb 17 05:49:47 F systemd[1]: netctl@wlp5s0\x2dmariposa3.service: Unit entered failed state. Feb 17 05:49:47 F systemd[1]: netctl@wlp5s0\x2dmariposa3.service: Failed with result 'exit-code'.
-- Subject: Unit netctl@wlp5s0\x2dmariposa3.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit netctl@wlp5s0\x2dmariposa3.service has begun starting up. Feb 17 05:49:47 F network[1104]: Starting network profile 'wlp5s0-mariposa3'. Feb 17 05:49:47 F network[1104]: The interface of network profile 'wlp5s0-mariposa3' is already up Feb 17 05:49:47 F systemd[1]: netctl@wlp5s0\x2dmariposa3.service: Main process exited, code=exited, Feb 17 05:49:47 F systemd[1]: Failed to start Networking for netctl profile wlp5s0-mariposa3. -- Subject: Unit netctl@wlp5s0\x2dmariposa3.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit netctl@wlp5s0\x2dmariposa3.service has failed. -- -- The result is failed. Feb 17 05:49:47 F systemd[1]: netctl@wlp5s0\x2dmariposa3.service: Unit entered failed state.
I also tried systemctl —type=service —no-pager:
UNIT LOAD ACTIVE SUB DESCRIPTION alsa-restore.service loaded active exited Save/Restore Sound Card State dbus.service loaded active running D-Bus System Message Bus dhcpcd.service loaded active running dhcpcd on all interfaces kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel ldconfig.service loaded active exited Rebuild Dynamic Linker Cache lightdm.service loaded active running Light Display Manager netctl.service loaded active exited (Re)store the netctl profile state ● netctl@wlp5s0\x2dmariposa.service loaded failed failed Networking for netctl profile wlp5s0-mariposa ● netctl@wlp5s0\x2dmariposa3.service loaded failed failed Networking for netctl profile wlp5s0-mariposa3 polkit.service loaded active running Authorization Manager systemd-backlight@backlight:intel_backlight.service loaded active exited Load/Save Screen Backlight Brightness of backlight:intel_backlight systemd-fsck@dev-disk-by\x2duuid-9abae156\x2dc7eb\x2d41e6\x2d9bd9\x2d9e259c439a4d.service loaded active exited File System Check on /dev/disk/by-uuid/9abae156-c7eb-41e6-9bd9-9e259c439a4d systemd-journal-catalog-update.service loaded active exited Rebuild Journal Catalog systemd-journal-flush.service loaded active exited Flush Journal to Persistent Storage systemd-journald.service loaded active running Journal Service systemd-logind.service loaded active running Login Service systemd-random-seed.service loaded active exited Load/Save Random Seed systemd-remount-fs.service loaded active exited Remount Root and Kernel File Systems systemd-sysctl.service loaded active exited Apply Kernel Variables systemd-sysusers.service loaded active exited Create System Users systemd-tmpfiles-setup-dev.service loaded active exited Create Static Device Nodes in /dev systemd-tmpfiles-setup.service loaded active exited Create Volatile Files and Directories systemd-udev-trigger.service loaded active exited udev Coldplug all Devices systemd-udevd.service loaded active running udev Kernel Device Manager systemd-update-done.service loaded active exited Update is Completed systemd-update-utmp.service loaded active exited Update UTMP about System Boot/Shutdown systemd-user-sessions.service loaded active exited Permit User Sessions user@1000.service loaded active running User Manager for UID 1000 LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 28 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'.
Last edited by Francuss (2017-02-18 14:33:44)
How to Connect to WiFi on Arch Linux: A Step-by-Step Guide
If you’re using a Linux distro other than Arch CLI, setting up WiFi on Arch Linux via the terminal is one of the most difficult chores. Despite the fact that the procedure is quite simple. In this tutorial, I’ll walk you through the step-by-step setup process to connect your Arch Linux to your WiFi network.
There are a lot of programs to setup a wireless connection in Linux, we could use ip and iw to configure an Internet connection, but it would be a little complicated for newbies. So we’ll use netctl, it’s a cli-based tool used to configure and manage network connections via profiles. Note: You must be root for all the configurations, also you can use sudo.
Before we continue, we’d like to tell you about Contabo. We host LinuxAndUbuntu on Contabo VPS. Check them out if you need web hosting. Prices start at $6.99 per month for an 8GB RAM and 4 Core CPU VPS.
Scanning Network
Run the command to know the name of your network interface –
Run the command to search the available WiFi networks. Now move down to look for your WiFi network.
iwlist interface scan | less
Note: Where an interface is the network interface that you found using the above iwconfig command. Run the command –
ip link set interface down
Setup A Wi-Fi Using netctl:
Before configuring a connection with netctl you must check the compatibility of your network card with Linux.
This command is to check if kernel loaded the driver for wireless card. The output must look like this:
If the kernel didn’t load the driver, you must install it using an Ethernet connection. Here is the Official Linux Wireless Wiki: https://wireless.wiki.kernel.org/If your wireless card is compatible with Linux, you can start with netctl configuration.
netctl works with profiles, the profile is a file that contains information about the connection. A profile can be created by the hard way or the easy way.
The Easy Way – Wifi-menu
If you want to use wifi-menu, the dialog must be installed.
1. Run the command: wifi-menu
3. Type the correct password and wait.
If you don’t have a failed connection message, then you can prove it typing the command:
Hurrah! If you’re watching it pinging, then the network is setup successfully. You’re now connected to WiFi network in Arch Linux. If you’ve any error then follow the above steps again. Perhaps you’ve missed something to do.
The Hard Way
In comparison to the above wifi-menu method, this method is a little hard. That’s I call it the hard way. In the above command, the network profile was setup automatically. In this method, we’ll setup the profile manually. But don’t worry this is not going to be much more complicated. So let’s get started!
- The first thing that you must do is know the name of your interface, generally, the name is wlan0/wlp2s0, but there are many exceptions. To know the name of your interface, you must type the command iwconfig and note it down.
In this subdirectory, you can see different profile examples. 3. Copy your profile example to /etc/netctl/your_profile
cp /etc/netctl/examples/wireless-wpa /etc/netctl/your_profile
4. You can see the profile content typing:
cat /etc/netctl/your_profile
5. Edit the following fields of your profile using vi or nano:
nano /etc/netctl/your_profile
- Interface: it would be wlan0
- ESSID: The name of your Internet connection
- key: The password of your Internet connection
Note: If you don’t know how to use nano, only edit your text, when you finish type ctrl+o and return, then type ctrl+x.
Running netctl
You must see the profile created by wifi-menu, for example, wlan0-SSID; or if you used the hard way then you must see the profile created by yourself.2
2. Start your connection profile typing the command:
netctl start your_profile
3. Test your connection typing:
The output must look like this:
6. Finally, you must run the following command: netctl enable your_profile.
netctl enable your_profile
This will create and enable a systemd service that will start when the computer boots. So it’s time shout Hurrah! You’ve setup wifi network in your Arch Linux.
Other Utilities
- iw dev wlan0 link – status
- iw dev wlan0 scan – Scanning networks
- iw dev wlan0 connect your_essid – Connecting to open network
- iw dev wlan0 connect your_essid key your_key – Connecting to WEP encrypted network using hexadecimal key.
Conclusion
So there you go! I have mentioned 3 ways to connect to a WiFi network in your Arch Linux. One thing that I want to focus here is that when you execute the first command, please note down the interface. In the next command where we scan networks, do not only use interface but the name of your interface such as wlan0 or wlp2s0 (you got from the previous command).