oe7drt-website/content/notes/archlinux/index.md

151 lines
2.5 KiB
Markdown
Raw Normal View History

2024-01-26 12:16:05 +01:00
---
title: Archlinux
date: 2023-11-29T20:33:48+0100
2024-04-14 11:49:14 +02:00
lastmod: 2024-04-14T09:49:14+0000
2024-01-26 12:16:05 +01:00
tags:
- archlinux
#showDate: false
showReadingTime: false
showWordCount: false
showPagination: false
#showAuthor: false
showBreadcrumbs: true
feed_exclude: true
# site_exclude: true
draft: true
2024-02-16 18:43:27 +01:00
2024-01-26 12:16:05 +01:00
---
2024-01-28 11:08:53 +01:00
## Predictable network interfaces
2024-04-13 12:21:20 +02:00
Get back the "old" interface names like `eth0` or `wlan0` with
[systemd.link](https://www.man.page/5/systemd.link).
2024-01-28 11:08:53 +01:00
2024-04-13 12:21:20 +02:00
### Ethernet
2024-01-28 11:08:53 +01:00
2024-04-13 12:21:20 +02:00
This makes my ethernet interface be called **eth0** again.
Create `/usr/lib/systemd/network/80-ether.link` with this content:
~~~systemd
[Match]
Type=ether
[Link]
NamePolicy=keep kernel
~~~
Reboot.
### Wireless
This makes my wireless interface be called **wlan0** again.
Create `/usr/lib/systemd/network/80-wlan.link` with this content:
~~~systemd
[Match]
Type=wlan
[Link]
NamePolicy=keep kernel
~~~
Reboot.
2024-01-28 11:08:53 +01:00
2024-01-26 12:16:05 +01:00
## Setup WiFi networks
### Using **iwctl**
~~~console
$ iwctl device list
$ iwctl station wlan0 scan
$ iwctl station wlan0 get-networks
$ iwctl station wlan0 connect {ssid}
~~~
### Using **nmcli** (NetworkManager)
~~~console
2024-04-13 21:45:11 +02:00
$ nmcli device wifi list
$ nmcli device wifi rescan
$ nmcli device wifi connect {ssid} --ask
$ nmcli device wifi show-password
2024-01-26 12:16:05 +01:00
~~~
2024-01-28 11:08:53 +01:00
2024-04-13 21:45:11 +02:00
Last command shows the connected SSID and a QR-code within the terminal.
2024-04-14 11:49:14 +02:00
## Using NetworkManager
We create some files in `/etc/NetworkManager/conf.d`:
## Using `iwd` as the WiFi backend
`wifi_backend.conf`:
~~~ini
[device]
wifi.backend=iwd
~~~
## Using `dhcpcd` as DHCP client
`dhcp-client.conf`:
~~~ini
[main]
dhcp=dhcpcd
~~~
## Do not manage one specific USB dongle
`99-unmanaged-devices.conf`:
~~~ini
[keyfile]
unmanaged-devices=mac:xx:xx:xx:xx:xx:xx
~~~
## Prefer local DNS instead of systemd-resolved defaults
<https://unix.stackexchange.com/a/442599>
2024-01-28 11:08:53 +01:00
## CPU frequency scaling
<https://wiki.archlinux.org/title/CPU_frequency_scaling>
## YubiKeys
<https://wiki.archlinux.org/title/YubiKey>
## LunarVim custom key mappings
I know, this is an Arch Linux post but hey, I don't care.
<https://github.com/LunarVim/LunarVim/issues/2602>
## Mounting nfs shares with systemd
<https://wiki.archlinux.org/title/NFS#Mount_using_/etc/fstab_with_systemd>
### Arch Linux ARM installation on a Raspberry Pi 2
The wiki page is for Raspberry Pi 4.
<https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4>
2024-03-02 10:56:32 +01:00
## Create a 32-bit Wine prefix
I create my wine prefixes usually like this:
~~~console
$ export WINEPREFIX=/home/dominic/.wine-winlink
$ export WINEARCH=win32
$ wine wineboot
~~~