[ Prev ] [ Index ] [ Next ]

netctl

Created mandag 31 oktober 2016


Netctl is a network configuration tool that works with profiles stored in /etc/netctl


WIFI

# Setting up wifi requires one to create a profile for the network - then start/enable it.


Creating Profiles

# A basic example, of a profile, is stored in /etc/netctl/example


# Using dialog ( wifi-menu )
$ wifi-menu -o # Automatically generates a profile in /etc/netctl


General Usage

# Start the profile
$ netctl start <PROFILE_NAME> # Profile refers to a saved profile in /etc/netctl


# Stop the profile
$ netctl stop <PROFILE_NAME>


# Reenable the profile
$ netctl reenable <PROFILE_NAME>


Automatic Connection on System Logon

# The wpa_actiond packages is actually for automatically switching profiles
# when moving from on saved hotspot to another saved hotspot.
# This package can also be used to automatically connect to a profile when logging on though.


# Install the wpa_actiond package
$ pacman -S wpa_actiond


# Enable with systemd
$ systemctl enable netctl-auto@wlp2s0.service # You can get your device name with iw dev


# To reconnect a network, restart the service
$ systemctl restart netctl-auto@wlp2s0.service


General Usage

# To get a complete list of options, run netctl-auto --help The list is short^


# List all profile
$ netctl-auto list # If there is a * in front of the profile, it means this is the connected profile


Good-to-Know

# Disable auto-connect for a specific profile
# You can exclude a profile from auto-connecting, by editing the profile in /etc/netcl and adding

ExcludeAuto=yes


Eduroam

# Save this config. In home ex. /home/stick/eduroam

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
network {
    ssid="eduroam"
    proto=RSN
    pairwise=CCMP
    eap=PEAP
    identity="<your university email>"
    password="<password>"
    key_mgmt=WPA-EAP
}


# Run this.
$ wpa_supplicant -c /home/stick/eduroam -i wlp2s0 -D nl80211


# If everything works, CTRL-C and add -B to the command for running it in the background.
$ wpa_supplicant -c /home/stick/eduroam -i wlp2s0 -D nl80211 -B



Ethernet

# There should probably be a more thorough guide for the Ethernet.. Maybe later^


Tips and Tricks

# Some random Tips and Tricks


Ethernet cable hotplug

# You can bring a device up/down upon ethernet cable insertion/removal with the ifplugd package
$ pacman -S ifplugd


# Ifplugd default configuration file can be found at /etc/ifplugd/ifplugd.conf
# note: default device is eth0


# Enable the service - My default ethernet card is called enp0s20u1
$ systemctl enable netctl-ifplugd@enp0s20u1.service