Arch Linux No Network After User Login Updated FREE

Arch Linux No Network After User Login

For this article nosotros will focus on network setup (at to the lowest degree what I've found and so far) and will look at some of the useful commands that I now utilize often.

Setting upwardly the network, and more than specifically the wifi can be traumatic. Yet, even without Ten windows there are some nice simple tools to help you to setup the wifi connection (like 'wifi-menu' that nosotros used before).

If you follow the step to fix upwardly the base of operations installation from this article, you should already take from your base installation the packages netctl and dialog. netctl is a batch script built on top of systemctl that allows you to start or stop the network profile configuration service.

Connecting Manually

Before trying to connect using some motorcar detection, information technology would exist practiced to understand what is happening under the hood. netctl is a simple command that allow y'all to list bachelor profiles, commencement a profile or stop a contour. In this section nosotros will first look at how to setup a wired connection followed by a wifi ane, and then get a quick overview of the netctl command line tool.

Setting up an Ethernet profile

netctl stores the connexion profile in the folder /etc/netctl. This folder has a child 1 named /etc/netctl/example which incorporate a set of different example profiles. Nosotros are interested here in the case profile whose name starts with 'ethernet'. In my case I take 3 examples:

  • ethernet-custom : allows you to see all the available fields you lot can set up
  • ethernet-dhcp : example to connect and go the IP address from a DHCP server
  • ethernet-static : example to setup a profile using a static IP address

Every bit my router is doing as well DHCP server for me, I will simply set up up the contour using ethernet-dhcp every bit a sample. The steps we take to do are:

Find the ethernet network interface name

Linux has a command line ip utility that permit you lot to query and update the network interfaces. The command line to run to list the network interfaces is

The result of the query is in my example IpLinkResult
The ethernet adaptor name starts everytime with enp - in my case the name is enp3s0

Copy the instance /etc/netctl/instance/ethernet-dhcp to /etc/netctl

We need to copy the case file /etc/netctl/example/ethernet-dhcp to the folder /etc/netctl and give it a proper name that is meaningful. In my case I volition name it enp3s0-ethernet-dhcp because it'due south a good representation of the profile'due south meaning. Dorsum to the command beat to copy the file using :

                cp /etc/netctl/instance/ethernet-dhcp /etc/netctl/enp3s0-ethernet-dhcp                              

Edit the Profile

Y'all can use whatsoever text editor that you want - vim is the 1 I'm using every time. Nosotros want to open /etc/netctl/enp3s0-ethernet-dhcp to change the property Interface with the one we found at step 1. The content y'all should have in the file at minimum is :

profile Content

Bank check the permission

The profile we just updated is good, nevertheless this is not protected against beingness seen past unauthorised users. This profile doesn't have a lot of of import information, although it will do subsequently on for the wifi setup. We will change the password using the control line chmod and set read/write simply for the root users.

                chmod 600 enp3s0-ethernet-dhcp                              

Plug in the ethernet cable and showtime the profile

We can now plug in our ethernet cable and get-go the profile. We will apply the command line netctl. The command to start the profile is

                                  sudo                  netctl start enp3s0-ethernet-dhcp                              

The best command to test that the profile is enabled and that you can access the network is to ping the google dhcp server with the accost 8.8.8.8 :-)

Setting wifi profile

If you installed the package dialog in the first post about installing archlinix, this allows yous to use a simple user interface that doesn't crave X windows to be installed. The command we will utilize is wifi-bill of fare, which is a simple script congenital on meridian of netctl.

                Please ever utilize the command *wifi-menu* with the option *-o* to be sure that the password is hashed in the profile file.                              

Running the command wifi-menu will create the profile file in the folder /etc/netctl and connect you lot to the network at the same time. You tin can even run the command again to connect to the wifi anytime yous want to alter the connectedness. The command yous have to run is the following

Yous volition see the post-obit displayed:

wifi-menu

Creating a wifi profile is simple with the use of wifi-menu. All the same yous can also create a wifi contour using the same type of manual steps as we used to set up the ethernet connection. The hardest part I found about doing that is that you need to know the wifi security type and you may take to put your password in clear.

Usage of netctl

Earlier nosotros already use the command netctl to outset the ethernet connectoin. netctl has a lot more than option that I volition list now.

  • Listing and brandish active connectedness
  • Stop/Beginning connection
  • Enable/Disable auto offset connection

Listing the profile available

netctl is using the folder /etc/netctl to save the registered profile. What is expert is that the tool has an option to list that direct and display as well the connections that are active with a *.

The output of that control will look like that. netctl-list

Starting and stoping profile

netctl allow to start and terminate connection profile. This command crave root permission and demand to be run nether sudo.

                                  # start the connection                  sudo                  netctl offset wpl1s0-myconnection                  # Finish the connection                  sudo                  netctl end wlp1s0-myconnection                              

Enable and disable auto connection as start

netctl tin can add a conneciton into systemctl which control the linux services. This is really usefull if y'all are connection everytime with the aforementioned contour, similar ethernet or your home wifi. We volition see later on how we could automate that even more so the system can discover and automatically switch profile for y'all.

                                  #Enable the profile wlp1s0-myconnection to start at kicking                  sudo                  netctl                  enable                  wpl1s0-myconnection                  #Disable the prfile wlp1s0-myconnection to beginning at kicking                  sudo                  netctl disable wpl1s0-myconnection                              

Automating auto connectedness

The information below come from the Archlinux Wiki on [netctl][https://wiki.archlinux.org/index.php/netctl#Automatic_switching_of_profiles]. The side by side step will require you to have a network connectedness active (ethernet or wifi) considering we will need to install some new packages.

Ethernet

So far you can only connect using the command line netctl. This is cracking, however information technology would be fifty-fifty ameliorate if when yous plug-in an ethernet cable your reckoner reconize it and get automatically an IP accost. Luckilly they are a service that you can install that know how to read the netctl config file and which will automatically handle the connection. The package is named ifplugd.

  • Install ifplugd
  • Enable the service Please note that you need to replace enp3s0 with the identifier of your network interface.
                                  sudo                  systemctl                  enable                  netctl-ifplugd@enp3s0.service                              

Wifi

I will provide you lot as well the mode for the Wifi connection to automatically witch between your available contour and option up the best one. Personally I don't similar my figurer to practise call back for me and I don't listen typing one command to connect, and so I haven't enabled this service. I feel as well it'southward more than secure that way. The service that let car connectedness of wifi profile is named wpa_actiond.

  • Install wpa_actiond
                                  sudo                  pacman                  -S                  wpa_actiond                              
  • Enable the service Delight note tht you demand to replace teh wlp1s0 wuth the identifier of your wifi interface
                sudo systemctl enable netctl-auto@wlp1s0.service                              

Summary

Corking, now we have some network, which volition permit u.s. to install new package and awarding to setup the rest of the computer. One think we will foccus on next is the user interface. This will brand the calculator lilliputian more than firendly :-). See you on the next post.

Arch Linux No Network After User Login

DOWNLOAD HERE

Source: http://blog.programmableproduction.com/2016/02/15/ArchLinux-Setting-Network-With-Netctl/

Posted by: acevessenter1965.blogspot.com

Comments