Table of Contents
安装arch
安装arch很简单,基本上按照arch wiki上写的一步步来就行了。
我主要参考了两个链接:
Arch Linux 安装指南
不过在过程中还是遇到了一个小坑:
按照Wiki的说法, arch-chroot
之后需要再次设置网络,但是我用wifi-menu重设了一次无线网络后,结果提示
Interface 'wlp4s2' is controlled by netctl-auto
然后尝试ping外网发现网络是断的。推出chroot后用 ip link
发现wlp4s2接口被down掉了.
在up该接口后,回复互联网的访问. 然后重新进入 arch-chroot
继续后面的操作.
ip link set wlp4s2 up
配置网络
用
wifi-menu
配置好wifiwifi-menu -o
安装自动连接wifi的软件包
pacman --noconfirm -S --needed wpa_actiond ifplugd wpa_supplicant
其中:
- wpa_actiond: 用于自动连接无线网络(Wireless Roaming/autoconnect )
- ifplugd: 用于自动连接以太网(Wired link detection )。
- wpa_supplicant: 用于无线网络认证
关闭netctl服务,启动netctl-auto服务
systemctl disable netctl systemctl enable netctl-auto@wlp4s2
不能同时启动netctl与netctl-auto,两者冲突
配置中文输入法
安装fictx
pacman --noconfirm -S fcitx-im fcitx-configtool fcitx-sunpinyin
在.xinitrc中添加:
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" fcitx &
Git
安装git
pacman --noconfirm -S git
配置git
git config --global --global user.email "lujun9972@gmail.com" git config --global --global user.name "darksun"
openssh
安装openssh
pacman --noconfirm -S git
生成公钥
ssh-keygen -y cat .ssh/id_rsa.pub
将公钥内容放到 github 中
Emacs
安装Emacs
pacman --noconfirm -S emacs
安装配置
git clone git@github.com:lujun9972/MyLisp.git ~/MyLisp git clone git@github.com:lujun9972/.spacemacs.d.git ~/.spacemacs.d mv ~/.emacs.d ~/emacs.d git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
Socketsock
安装
pacman --noconfirm -S shadowsocks
窗口管理器
安装awesomeWm
pacman --noconfirm -S awesome
在.xinitrc中添加:
exec awesome
配置
从 https://github.com/lujun9972/dotfile/blob/master/dotfile.org 中tangle出awesomeWm的配置文件.
声音配置
Arch Linux默认开启了声音支持,默认静音。用户可通过 alsamixer(所属包:alsa-utils) 取消静音:
pacman --noconfirm -S alsa-utils
- 方向键 选中 Master 和 PCM
- [M] 取消静音
- 上下键调整音量
mpg123
pacman --noconfirm -S mpg123
恢复配置
我用Emacs的org-mode来管理dotfile.
所有的dotfile基本都以src block的形式存在https://github.com/lujun9972/dotfile/blob/master/dotfile.org 中了
只需要执行下面这段emacs-lisp代码就能恢复配置了
(require 'url-handlers)
(let ((tmpfile (make-temp-name "/tmp/dotfile")))
(url-copy-file "https://raw.githubusercontent.com/lujun9972/dotfile/master/dotfile.org" tmpfile)
(find-file tmpfile)
(org-mode)
(call-interactively #'org-babel-tangle)
(delete-file tmpfile))