引言
不久前尝鲜Manjaro系统,这便捷的包管理系统和庞大的软件库简直令人惊喜。进而更多的了解了一些关于Arch系linux的特点,并总结了一些安装Manjaro系统之后首先要做的事情,供参考。
关于滚挂
Manjaro官方仓库中的包是滞后于Arch官方库的。说明白一点,让Arch用户当了小白鼠,一旦有问题出现,就能提前预防,所以Manjaro官方库中出问题的可能性非常低。
滚挂的后果
如果你是一个有经验的Linux使用者,熟悉各种命令,那么,滚挂之后你仍能够借助liveCD将系统轻松救回来。
对于仅会使用GUI桌面的小白用户,只要及时备份,就不怕滚挂。
如何预防滚挂
- 准备一个U盘,刻录LiveCD进U盘,liveCD就是安装Manjaro时使用的官方镜像ISO的内容。
- 及时备份,可以写脚本每周备份,常用的备份命令是:
tar cvpjf backup.tar.bz2 --exclude-from=excl /
- 养成良好的更新习惯,进行系统更新前去官网新闻看看,这次更新都有什么内容,最好订阅其RSS。
- 勤更新,大概每周更一次就足够了。最好不要等半年才更新一次,很多攒了大量更新是滚挂的重要原因。
- 学习Linux命令模型,大多数滚挂指的是Xwindow进不去了,但命令行模式总是可以进的,熟悉linux命令,就可以在命令行模式补救系统。
总的来说,Manjaro系统滚挂的概率是非常低的,一旦出事你会感谢你平时做的准备。跟家里放个灭火器的原理一样,紧急时刻能救命。
Manjaro安装后首先需要做什么
Linux系统安装完毕后,如果需要投入生产力,需要做一些设置。这里其实很主观,毕竟每个人都有不同的习惯,需要用的工具也不同,这里列举我平时爱用的一些工具和设置。
换源
大家都知道,如果不换源,Pacman下载速度会特别慢。
具体步骤是:
sudo pacman -Syy
sudo pacman-mirrors -i -c China -m rank
sudo pacman -Syyu
使用root权限编辑/etc/pacman.conf
增加以下内容
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server =https://mirrors.ustc.edu.cn/archlinuxcn/$arch
然后执行
sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring
中文输入法
本人喜欢搜狗输入法
sudo pacman -S fcitx-lilydjwg-git
sudo pacman -S fcitx-sogoupinyin
sudo pacman -S fcitx-im # 全部安装
sudo pacman -S fcitx-configtool # 图形化配置工具
编辑~/.xprofile
文件,在文件末尾增加以下内容
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
注销再登录后,就能在右下角(或左上角)看到fcitx图标咯。
中文字体
常规的Linux系统中文字体都很缺乏,需要自己安装
sudo pacman -S ttf-roboto noto-fonts ttf-dejavu
# 文泉驿
sudo pacman -S wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei
# 思源字体
sudo pacman -S noto-fonts-cjk adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts
创建文件.config/fontconfig/fonts.conf
,加入下面的配置:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>
<description>Manjaro Font Config</description>
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<dir>~/.fonts</dir> <!-- this line will be removed in the future -->
<!-- 自动微调 微调 抗锯齿 内嵌点阵字体 -->
<match target="font">
<edit name="autohint"> <bool>false</bool> </edit>
<edit name="hinting"> <bool>true</bool> </edit>
<edit name="antialias"> <bool>true</bool> </edit>
<edit name="embeddedbitmap" mode="assign"> <bool>false</bool> </edit>
</match>
<!-- 英文默认字体使用 Roboto 和 Noto Serif ,终端使用 DejaVu Sans Mono. -->
<match>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Roboto</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>DejaVu Sans Mono</string>
</edit>
</match>
<!-- 中文默认字体使用思源宋体,不使用 Noto Sans CJK SC 是因为这个字体会在特定情况下显示片假字. -->
<match>
<test name="lang" compare="contains">
<string>zh</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend">
<string>Source Han Serif CN</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>zh</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Source Han Sans CN</string>
</edit>
</match>
<match>
<test name="lang" compare="contains">
<string>zh</string>
</test>
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans Mono CJK SC</string>
</edit>
</match>
<!-- 把Linux没有的中文字体映射到已有字体,这样当这些字体未安装时会有替代字体 -->
<match target="pattern">
<test qual="any" name="family">
<string>SimHei</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Source Han Sans CN</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>SimSun</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Source Han Serif CN</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>SimSun-18030</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>Source Han Serif CN</string>
</edit>
</match>
<!-- Load local system customization file -->
<include ignore_missing="yes">conf.d</include>
<!-- Font cache directory list -->
<cachedir>/var/cache/fontconfig</cachedir>
<cachedir prefix="xdg">fontconfig</cachedir>
<!-- will be removed in the future -->
<cachedir>~/.fontconfig</cachedir>
<config>
<!-- Rescan in every 30s when FcFontSetList is called -->
<rescan> <int>30</int> </rescan>
</config>
</fontconfig>
常用软件
按需安装
office软件及相应字体
sudo pacman -S wps-office
sudo pacman -S ttf-wps-fonts
Vim编辑器
sudo pacman -S vim
AUR助手(以防官方仓库没有想要的软件)
sudo pacman -S yay
chrome浏览器
sudo pacman -S google-chrome
git
sudo pacman -S git
安装配置oh my zsh
sudo pacman -S zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # 下载并配置ohmyzsh
chsh -s /bin/zsh #更换默认bash,重启后生效
安装Markdown编辑器
sudo pacman -S typora
安装qq,基于wine的,功能很全
sudo pacman -S deepin.com.qq.im
总结
Manjaro的机制保证了滚挂的可能性很低。如果数据真的很宝贵,请做好备份。多学一些linux基本知识,即使滚挂了,也能救回来。另外,由于pacman的库内容真的强大,因此安装常用软件易如反掌。