Files
archlinux-config/README.md
T

49 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Arch Linux 配置仓库
使用 [decman](https://github.com/kiviktnm/decman) 声明式管理 Arch Linux 系统配置。
默认面向 WSL 环境;裸机使用请按需修改 `source.py`
## 使用
### 安装 Arch LinuxWSL
需要 Windows 10/11 并已启用 WSL 2。在 PowerShell 中执行:
```powershell
wsl --update
wsl --install archlinux
```
安装完成后,可通过开始菜单的 `archlinux` 应用或命令 `wsl -d archlinux` 启动,首次进入默认以 `root` 身份登录。
### WSL 首次启动(默认 root 登录)
1. 初始化普通用户:
```bash
curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/main/scripts/wsl-init.sh | bash -s -- <用户名>
```
2. 在 PowerShell 中设置默认用户并重启:
```powershell
wsl --manage archlinux --set-default-user <用户名>
wsl --terminate archlinux
```
3. 重新进入 WSL,以普通用户执行:
```bash
curl -fsSL https://git.furtherverse.com/imbytecat/archlinux-config/raw/branch/main/scripts/install.sh | bash
```
### 非 WSL 环境
直接执行第 3 步。
## 更新配置
```bash
cd ~/.config/archlinux-config && git pull && sudo decman
```