装Arch记

安装arch

安装arch很简单,基本上按照arch wiki上写的一步步来就行了。

我主要参考了两个链接:
Arch Linux 安装指南

Arch wiki 安装指南

不过在过程中还是遇到了一个小坑:

按照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

配置网络

  1. wifi-menu 配置好wifi

    wifi-menu -o
    
  2. 安装自动连接wifi的软件包

    pacman --noconfirm -S --needed wpa_actiond ifplugd wpa_supplicant
    

    其中:

    • wpa_actiond: 用于自动连接无线网络(Wireless Roaming/autoconnect )
    • ifplugd: 用于自动连接以太网(Wired link detection )。
    • wpa_supplicant: 用于无线网络认证
  3. 关闭netctl服务,启动netctl-auto服务

    systemctl disable netctl
    systemctl enable netctl-auto@wlp4s2
    

    不能同时启动netctl与netctl-auto,两者冲突

配置中文输入法

  1. 安装fictx

    pacman --noconfirm -S fcitx-im fcitx-configtool fcitx-sunpinyin
    
  2. 在.xinitrc中添加:

    export GTK_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx
    export XMODIFIERS="@im=fcitx"
    fcitx &
    

Git

  1. 安装git

    pacman --noconfirm -S git
    
  2. 配置git

    git config --global --global user.email "lujun9972@gmail.com"
    git config --global --global user.name "darksun"
    

openssh

  1. 安装openssh

    pacman --noconfirm -S git
    
  2. 生成公钥

    ssh-keygen -y
    cat .ssh/id_rsa.pub
    
  3. 将公钥内容放到 github

Emacs

  1. 安装Emacs

    pacman --noconfirm -S emacs
    
  2. 安装配置

    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

窗口管理器

  1. 安装awesomeWm

    pacman --noconfirm -S awesome
    
  2. 在.xinitrc中添加:

    exec awesome
    
  3. 配置
    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))
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值