LoginSignup
3
2

More than 5 years have passed since last update.

ArchLinuxで無線LAN設定(WPA/WPA2)

Posted at

概要

ArchLinuxで無線LANの設定をします。

手順

wpa_supplicantインストール

WPA/WPA2の場合はwpa_supplicantが必要です。

pacman -S wpa_supplicant

でインストールします。

無線インターフェイスを確認

ip link

上記コマンドで無線インターフェイスを確認します。wlan0, wlp2s1, ath0 などがあるらしいです。私の場合はwlp2s0でした。

接続用プロファイルの作成

/etc/netctl/examples配下に接続用プロファイルのサンプルが置いてあります。 これをコピーして接続用プロファイルを作成します。今回はWPA/WPA2ですので、wireless-wpaを使用します。

  • プロファイルをコピーします。
cp /etc/netctl/examples/wireless-wpa /etc/netctl/[プロファイル名]
  • 必要な部分を変える
vim /etc/netctl/[プロファイル名]

最初こんな感じになっている思います。

Description='A simple WPA encrypted wireless connection'
Interface=wlan0
Connection=wireless

Security=wpa
IP=dhcp

ESSID='MyNetwork'
# Prepend hexadecimal keys with \"
# If your key starts with ", write it as '""<key>"'
# See also: the section on special quoting rules in netctl.profile(5)
Key='WirelessKey'
# Uncomment this if your ssid is hidden
#Hidden=yes
# Set a priority for automatic profile selection
#Priority=10

このファイルの中の

Interface=[無線インターフェース]
ESSID='[APのSSID]'
Key='[APのパスワード]'

の部分を変更して保存します。

接続

root権限で

netctl start [プロファイル名]

で接続します。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2