1 簡介1.1 Manjaro Linux1.2 開發桌面環境2 自動打開 NumLock3 系統快照3.1 安裝timeshift3.2 使用timeshift建立系統快照4 國內源設置4.1 manjaro官方軟件倉庫4.1.1 自動尋找最快的源4.1.2 選擇源4.1.3 更新源4.2 非官方倉庫(Arch Linux 中文社區倉庫)4.2.1 手動添加archlinuxcn清華源4.2.2 更新源4.2.3 安裝archlinuxcn-keyring包導入GPG key:4.2.4 再次更新源5 安裝yaourt以及pacaur6 軟件安裝時下載加速6.1 使用aria2c多線程多連接加速6.1.1 安裝aria2c6.1.2 配置pacman多線程多連接加速6.1.3 配置yaourt多線程多連接加速6.2 使用Axel單線程多連接加速6.2.1 安裝axel6.2.2 配置pacman單線程多連接加速6.2.3 配置yaourt單線程多連接加速6.2.4 而後更新數據源7 安裝被鎖定的問題8 升級系統9 常見的軟件安裝9.1 pacman 基本用法9.1.1 安裝軟件9.1.2 刪除軟件9.1.3 清空緩存9.1.4 查詢9.1.5 同步文件數據庫9.1.6 升級系統9.2 安裝中文輸入法9.3 安裝字體9.4 安裝vim9.4.1 超強vim配置9.5 安裝markdown編輯器9.6 安裝git9.7 安裝smartGit9.8 安裝圖形化的解壓軟件9.9 安裝bat替代cat9.10 安裝護眼軟件紅移redshift9.11 安裝gnome磁盤管理9.12 安裝截圖軟件(可編輯)9.13 安裝google瀏覽器9.14 安裝uGet9.15 安裝網易雲音樂9.16 安裝osdlyrics(本地音樂播放器顯示歌詞須要)9.17 安裝WPS-office9.18 安裝有道詞典9.19 安裝ClamAV9.20 安裝sublime-text-39.21 安裝虛擬機9.22 安裝QQ9.23 安裝Tim9.24 安裝微信9.24.1 命令直接安裝9.24.2 源碼編譯安裝9.24.3 使用發佈版9.25 安裝oh my zsh9.25.1 查看系統是否安裝了zsh9.25.2 查看系統當前使用的shell9.25.3 切換shell爲zsh9.25.4 下載安裝 oh my zsh9.25.5 配置oh my zsh10 XFCE圖標主題美化10.1 安裝圖標10.2 安裝主題10.3 設置11 優化系統啓動速度12 將npm的註冊表源設置爲國內的鏡像13 問題與解決13.1 安裝中遇到的問題13.2 警告:xxx本地比xxx的版本更新13.2.1 解決辦法13.3 aria2c下載xxx.db.sig出現錯誤13.3.1 解決辦法13.4 錯誤:沒法註冊 ‘archlinuxcn’ 數據庫 (數據庫已登記)附錄I:/etc/pacman.conf附錄II:/etc/makepkg.conf附錄III:/etc/pacman.d/mirrorlist附錄IV:.zshrcjavascript
Manjaro Linux是一個基於Arch Linux的發行版,繼承了後者輕快、滾動式更新、AUR軟件多的==優勢==,同時又改善了後者對新手不友好、軟件包過於激進、不夠穩定的==缺點==,是最能拿來用、最好用的Linux發行版。php
它不只開箱即用,界面人性化,輕快不卡慢,穩定無崩潰,安靜無彈窗,最最可喜的是軟件超多!相信你用了Manjaro以後,再不會折騰、也不會再拋棄這個發行版了。java
我對桌面環境的需求次序(優先級由高到低):node
系統性能好,佔用資源少——》軟件數量多——》對用戶友好,易安裝,易使用——》界面美觀linux
性能git
對系統性能的要求,必需要足夠好,佔用資源少,給開發留下的資源越多越好。程序員
做爲一個開發者(程序員),想要提工做高效率,對系統性能的要求幾乎達到苛刻的地步。github
由於開發者在處理一個問題時,動則要調用大量工具,或者同時打開十幾、幾10、上百個網頁來搜索網上的解決方案,而firefox或chrome等上網工具都是吃內存大戶(犧牲空間複雜度換來快速的時間複雜度),有時候必須犧牲一些後臺程序以加快系統速度適應開發者的須要。web
而Manjaro Linux發行版和Xfce桌面都具備快速、輕量、加載程序快速、佔用的系統資源少的優勢。sql
軟件
爲了節省沒必要要的折騰時間,開發者手頭上的工具是越多越好、越容易獲取越好。
centos、slackware這些軟件奇缺或者須要很是複雜的途徑才能找到安裝源的系統就不必嘗試了。
ubuntu系軟件比較豐富,但QQ/TIM這樣的基本軟件還須要折騰一番,還未必能穩定使用。
arch linux系軟件包異常豐富,無情碾壓deb和rpm系諸多發行版,例如manjaro下能夠一條命令安裝好無比穩定、功能全面的deepinwine-tim或deepinwine-qq。
對用戶友好
對任何一個工做者來講,時間就是衡量一切價值的標準,節省時間就是延長生命尺度。拿archlinux爲反面典型,雖然其性能高能夠節省工做時間,可是若是安裝它都要從頭開始學習ABC,那價值就大打折扣。就安裝系統的便捷性來講,archlinux、gentoo、lfs這樣的系統真不必嘗試。
界面外觀
爲了性能,必須犧牲酷炫的外觀,過炫的桌面影響桌面性能;可是過於簡單的桌面須要花時間配置還不必定能徹底配置好,也是影響工做效率。因此,外觀普通便可,默認桌面選擇xfce四、lxde、mate甚至仿製windows界面都是不錯的。
綜合考慮下,如下是我對一些發行版及桌面的排序(僅表明我的觀點):
manjaro——》mint——》ubuntu——》debian——》其餘
xfce 4——》mate/gnome-classic——》cinnamon——》lxde——》其餘
我選擇的開發桌面環境:
確保已經安裝 numlockx, 而後編輯 /etc/lightdm/lightdm.conf文件,在末尾添加如下幾行:
1[Seat:*]
2greeter-setup-script=/usr/bin/numlockx on
sudo pacman -S timeshift
sudo pacman-mirrors -i -c China -m rank
1
2[elinuxboy@mjro18xfce ~]$ sudo pacman-mirrors -i -c China -m rank
3.: INFO Downloading mirrors from repo.manjaro.org
4.: INFO Using default mirror file
5.: INFO Querying mirrors - This may take some time
6 0.867 China : https://mirrors.ustc.edu.cn/manjaro/
7 0.557 China : http://mirrors.tuna.tsinghua.edu.cn/manjaro/
8 0.861 China : https://mirrors.zju.edu.cn/manjaro/
9 0.727 China : https://mirrors.sjtug.sjtu.edu.cn/manjaro/
10<br>
11.: INFO User generated mirror list
12--
13.: INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
14.: INFO Writing mirror list
15 China : http://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$a
16.: INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
17[elinuxboy@mjro18xfce ~]$
18<br>
19
在彈出窗口中選擇排第一位的源(這裏選擇清華大學tsinghua的源)而後點擊「OK」,再次單擊「肯定」便可選擇好最快的源。
sudo pacman -Sy
Arch Linux 中文社區倉庫 是由 Arch Linux 中文社區驅動的非官方用戶倉庫。包含中文用戶經常使用軟件、工具、字體/美化包等。
完整的包信息列表(包名稱/架構/維護者/狀態)請 點擊這裏 查看。
sudo vim /etc/pacman.conf
用上面的命令編輯/etc/pacman.conf,在最下方添加(這裏使用清華大學的源):
1[archlinuxcn]
2Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
詳情參見附錄I。
sudo pacman -Sy
sudo pacman -S archlinuxcn-keyring
sudo pacman -Sy
爲了安裝使用AUR方便,也能夠額外安裝yaourt以及pacaur
sudo pacman -S yaourt pacaur
注意:使用使用yaourt安裝軟件時:
a.不須要使用sudo不然報root錯誤;
b.在提示調用vim時 輸入vim而後回車;
c.若是不想輸入vim: 修改~/.zshrc 文件文件最後加入export VISUAL=「vim」 便可。
設置替換wget或者curl下載命令。如下在配置時,aria2c和axel使用其中一種便可(這裏使用aria2c)。
aria2c 是一個自由、開源、輕量級多協議和多源的命令行下載工具。
aria2c 支持 HTTP/HTTPS、FTP、SFTP、 BitTorrent 和 Metalink 協議。
aria2c 能夠經過內建的 JSON-RPC 和 XML-RPC 接口來操縱。
aria2c 下載文件的時候,自動驗證數據塊。它能夠經過多個來源或者多個協議下載一個文件,而且會嘗試利用你的最大下載帶寬。
aria2c 支持多線程,可使用多個源或協議下載文件,確實能夠加速並儘量多的完成下載。
sudo pacman -Sy aria2c
編輯pacman配置文件/etc/pacman.conf,找到Xfercommand修改爲以下:
1......
2# aria2c 多線程多連接
3XferCommand = /usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 -d $(dirname %o) -o $(basename %o) %u
4......
編輯makepkg配置文件/etc/makepkg.conf,找到DLAGENTS修改爲以下
1
2......
3#DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
4# 'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
5# 'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
6# 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
7# 'rsync::/usr/bin/rsync --no-motd -z %u %o'
8# 'scp::/usr/bin/scp -C %u %o')
9#aria2c 多線程多連接
10DLAGENTS=('file::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
11 'ftp::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
12 'http::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
13 'https::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
14 'rsync::/usr/bin/rsync --no-motd -z %u %o'
15 'scp::/usr/bin/scp -C %u %o')
16......
17<br>
18
詳情請參見附錄II。
Axel 是一個輕量級下載程序,它和其餘加速器同樣,對同一個文件創建多個鏈接,每一個鏈接下載單獨的文件片斷以更快地完成下載。
Axel 支持 HTTP、HTTPS、FTP 和 FTPS 協議。它也可使用多個鏡像站點下載單個文件,因此,Axel 能夠加速下載高達 40%(大約,我我的認爲)。它很是輕量級,由於它沒有依賴而且使用很是少的 CPU 和內存。
Axel 一步到位地將全部數據直接下載到目標文件(LCTT 譯註:而不是像其它的下載軟件那樣下載成多個文件塊,而後拼接)。
注意:不支持在單條命令中下載兩個文件。
sudo pacman -S axel
編輯pacman配置文件/etc/pacman.conf,找到Xfercommand修改爲以下:
1......
2# axel 單線程多連接
3XferCommand = /usr/bin/axel -a -n 16 %u -o %o
4......
編輯makepkg配置文件/etc/makepkg.conf,找到DLAGENTS修改爲以下
1
2......
3#DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
4# 'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
5# 'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
6# 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
7# 'rsync::/usr/bin/rsync --no-motd -z %u %o'
8# 'scp::/usr/bin/scp -C %u %o')
9#axel 單線程多連接
10DLAGENTS=('file::/usr/bin/axel -a -n 16 %u -o %o'
11 'ftp::/usr/bin/axel -a -n 16 %u -o %o'
12 'http::/usr/bin/axel -a -n 16 %u -o %o'
13 'https::/usr/bin/axel -a -n 16 %u -o %o'
14 'rsync::/usr/bin/rsync --no-motd -z %u %o'
15 'scp::/usr/bin/scp -C %u %o')
16......
17<br>
18
sudo pacman -Syy
注意:出現沒法鎖定database的錯誤時,在確認沒有安裝任務時運行如下命令刪除鎖定:
sudo rm /var/lib/pacman/db.lck
sudo pacman -Syu
或者
yaourt -Syu
1# 安裝或者升級單個軟件包,或者一列軟件包(包含依賴包),使用以下命令:
2sudo pacman -S pkg_name1 pkg_name2 ...
3
4# 安裝一個本地包(不從源裏下載):
5sudo pacman -U /path/to/package/package_name-version.pkg.tar.xz
6
7# 安裝一個遠程包(不在 pacman 配置的源裏面):
8sudo pacman -U http://www.example.com/repo/example.pkg.tar.xz
9
10# 下載包而不安裝它:
11sudo pacman -Sw pkg_name
1# 刪除指定安裝包,可是保留其所有已安裝的依賴關係
2sudo pacman -R pkg_name
3
4# 刪除指定軟件包,以及沒有被其餘已安裝軟件包使用的依賴關係。
5sudo pacman -Rs pkg_name
6
7# 刪除軟件包和全部依賴這個軟件包的程序:
8# 警告: 此操做是遞歸的,請當心檢查,可能會一次刪除大量的軟件包。
9sudo pacman -Rsc pkg_name
10
11# 刪除軟件包,可是不刪除依賴這個軟件包的其餘程序:
12sudo pacman -Rdd pkg_name
1# 清除未安裝軟件包的緩存
2sudo pacman -Sc
1# 在包數據庫中查詢軟件包,查詢位置包含了軟件包的名字和描述(不指定string,則列出全部已安裝的包):
2pacman -Ss string1 string2 ...
3
4# 查詢包含某個文件的包名
5pacman -Fs pkg_name
6
7# 查詢遠程庫中軟件包包含的文件:
8pacman -Fl pkg_name
9
10# 獲取已安裝軟件包所包含文件的列表:
11pacman -Ql pkg_name
12
13# 查詢已安裝的軟件包(不指定string,則列出全部已安裝的包):
14pacman -Qs string1 string2 ...
15
16# 顯示軟件包的詳盡的信息:
17sudo pacman -Si pkg_name
18
19# 查詢本地安裝包的詳細信息:
20sudo pacman -Qi pkg_name
1# 同步文件數據庫:
2sudo pacman -Fy
1# 升級整個系統,這個命令會同步非本地(local)軟件倉庫並升級系統的軟件包:
2sudo pacman -Syu
3
4# 升級系統時安裝其餘軟件包:
5sudo pacman -Syu pkg_name1 pkg_name2 ...
6
7# 強制 pacman 刷新軟件包列表,每次修改鏡像以後都應該使用
8sudo pacman -Syyu
fcitx安裝後會默認安裝了拼音和五筆輸入法。
sudo pacman -S fcitx fcitx-im fcitx-configtool
須要修改配置文件 ~/.xprofile,添加以下語句:
1#fcitx
2export GTK_IM_MODULE=fcitx
3export QT_IM_MODULE=fcitx
4export XMODIFIERS="@im=fcitx"
安裝其餘中文輸入法
谷歌拼音輸入法
sudo pacman -S fcitx-googlepinyin
啓動fcitx並設置輸入法以後就可使用中文輸入法啦,若是異常請從新登陸或者重啓!!
sudo pacman -S ttf-dejavu wqy-zenhei wqy-microhei ttf-monaco
要使用新安裝的字體,須要再設置裏自行選擇。
sudo pacman -S vim
項目地址:https://github.com/elinuxboy/vim-deprecated
使用下面的命令自動安裝配置:
wget -qO- https://raw.githubusercontent.com/elinuxboy/vim-deprecated/master/setup.sh | sh -x
或者用另外一種方式自動安裝:
1wget https://raw.githubusercontent.com/elinuxboy/vim-deprecated/master/setup.sh
2chmod +x setup.sh
3./setup.sh
如下只須要使用其中一種或幾種。
yaourt -S typora
(推薦使用)
sudo pacman -S remarkable
yaourt -S haroopad
sudo pacman -S retext
sudo pacman -S git
設置我的github信息
git config --global user.name "github暱稱"
git config --global user.email "註冊郵箱"
一個Git客戶端。archlinux/manjaro的主源裏就有它。
yaout -S smartgit
sudo pacman -S p7zip file-roller unrar
sudo pacman -S bat
sudo pacman -S redshift
sudo pacman -S gnome-disk-utility
yaourt -S hotshots
注意:由於網絡問題,這裏可能須要對PKGBUILD作一些修改,將http改成https。
sudo pacman -S google-chrome
Linux 下最好的下載管理器
sudo pacman -S uget
yaourt -S netease-cloud-music
sudo pacman -S osdlyrics
sudo pacman -S wps-office
有道詞典。
yaourt -S youdao-dict
Clam 防病毒軟件(命令行)
sudo pacman -S clamav
Clam 防病毒軟件(客戶端)
sudo pacman -S clamtk
輸入法修復版本
yaourt -S sublime-text-3-imfix
若是默認的拼音輸入法仍是沒法使用,須要安裝其餘中文輸入法。如谷歌拼音/搜狗拼音等。
yaourt -S vmware-workstation
注意:若是出現vmmod找不到的問題,須要安裝linux-headers後再一次安裝,以後從新登錄後便可。
yaourt -S deepin.com.qq.im
yaourt -S deepin.com.qq.office
微信,公認最好的,是electronic-wechat。
yaourt -S electronic-wechat
在下載和運行這個項目以前,你須要在電腦上安裝 Git 和 Node.js (來自 npm)。在命令行中輸入:
git clone https://github.com/geeeeeeeeek/electronic-wechat.git
cd electronic-wechat
sudo npm install && sudo npm start
sudo npm run build:linux
1tar xvf electronic-wechat-linux-x64.tar.gz
2cd electronic-wechat-linux-x64
3./electronic-wechat %U
能夠給他添加快捷方式
cat /etc/shells
1# Pathnames of valid login shells.
2# See shells(5) for details.
3
4/bin/sh
5/bin/bash
6/bin/zsh
7/usr/bin/zsh
8/usr/bin/git-shell
若是已經安裝zsh,則會多出來如下條目
1/bin/zsh
2/usr/bin/zsh
1----
$ echo $SHELL
1/bin/bash
$ chsh -s /bin/zsh
若是要切換回去bash:
chsh -s /bin/bash
重啓生效,以下所示:
1
2......
3This is the Z Shell configuration function for new users,
4zsh-newuser-install.
5You are seeing this message because you have no zsh startup files
6(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
7~). This function can help you with a few settings that should
8make your use of the shell easier.
9<br>
10You can:
11<br>
12(q) Quit and do nothing. The function will be run again next time.
13<br>
14(0) Exit, creating the file ~/.zshrc containing just a comment.
15 That will prevent this function being run again.
16<br>
17(1) Continue to the main menu.
18<br>
19--- Type one of the keys in parentheses --- 0
20mjroXfce18%
21<br>
22
$ echo $SHELL
1/bin/zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
完成後以下所示:
1
2......
3Looking for an existing zsh config...
4Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh
5Using the Oh My Zsh template file and adding it to ~/.zshrc
6 __ __
7 ____ / /_ ____ ___ __ __ ____ _____/ /_
8 / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
9/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
10\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
11 /____/ ....is now installed!
12<br>
13<br>
14Please look over the ~/.zshrc file to select plugins, themes, and options.
15<br>
16p.s. Follow us at https://twitter.com/ohmyzsh.
17<br>
18p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.
19<br>
20mjroXfce18%
21<br>
22
1sudo pacman -S autojump
2echo ". /usr/share/autojump/autojump.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
3source .zshrc
1git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
2echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
3source .zshrc
1git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
2echo "source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
3source .zshrc
1cd $ZSH_CUSTOM/plugins
2mkdir incr
3cd incr
4wget http://mimosa-pudica.net/src/incr-0.2.zsh
5echo "source $ZSH_CUSTOM/plugins/incr/incr*.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
6source .zshrc
詳細的.zshrc請參見附錄IV。
修改.zshrc文件
1vim ~.zshrc
找到ZSH_THEME=「robbyrussell」,修改成:ZSH_THEME=「ys」;
1......
2ZSH_THEME="ys"
3......
更新配置
1source .zshrc
yaourt -S numix-circle-icon-theme-git
sudo pacman -S papirus-icon-theme
sudo pacman -S arc-gtk-theme
Arch Linux 的 systemd-analyze 是個很不錯的工具,利用它你能夠很直觀地觀察到系統啓動的時間都花到哪兒去了:
systemd-analyze
我注意到打開 AHCI 後,內核和用戶空間的載入速度明顯提升了,總啓動時間從約 30 秒縮短到 20 秒,效果很是明顯。
用下面這個命令,能夠了解到是什麼東西啓動最慢:
systemd-analyze blame
此外,還能夠把啓動過程繪製成 SVG 圖表供你審閱(用 GNOME 的圖片預覽或 Chrome 瀏覽器均可以打開),這個圖表中你還能夠觀察到是否有啓動慢的組件影響到了依賴它的組件的啓動:
systemd-analyze plot > plot.svg
國內用戶,建議將npm的註冊表源設置爲國內的鏡像,能夠大幅提高安裝速度。
registry地址:http://registry.npm.taobao.org/
搜索地址:http://cnpmjs.org/
registry地址:http://r.cnpmjs.org/
npm --registry https://registry.npm.taobao.org install express
npm config set registry https://registry.npm.taobao.org
配置後可經過下面方式來驗證是否成功npm config get registry
或npm info express
經過cnpm(可能須要加上sudo)
npm install -g cnpm --registry=https://registry.npm.taobao.org
使用cnpm install express
我使用的是cnpm.以下圖:
安裝時一直停在「正在加載位置數據」
解決辦法:先把網絡鏈接都斷開,再啓動安裝,等地圖位置加載完成後,再聯網繼續安裝。
例如,加入archlinuxcn中文社區庫後,執行sudo pacman -Syu升級系統後,出現以下問題:
1......
2警告:cower:本地 (18-2) 比 extra 的版本更新 (18-1)
3警告:inxi:本地 (3.0.29-1) 比 community 的版本更新 (3.0.28-1)
4警告:lib32-qt4:本地 (4.8.7-14) 比 multilib 的版本更新 (4.8.7-13)
5警告:libxpresent:本地 (1.0.0+3+g9d31d21-1) 比 extra 的版本更新 (1.0.0+2+gdd6771c-1)
6警告:package-query:本地 (1.9-3) 比 extra 的版本更新 (1.9-2)
7......
該問題通常出如今:啓用了多個鏡像(好比同時使用manjaro官方庫和archlinuxcn中文社區庫),或者剛切換了鏡像,而後執行升級系統命令。
該問題能夠忽略,由於archlinuxcn中文社區庫裏面的版本要比manjaro官方庫裏面的版本更新,升級後本地的版本就是使用archlinuxcn中文社區庫裏面的最新版本。
例如:
1$ pacman -Ss cower
2extra/cower 18-1 [已安裝: 18-2]
3 A simple AUR agent with a pretentious name
4archlinuxcn/cower 18-2 [已安裝]
5 A simple AUR agent with a pretentious name
固然,也能夠給軟件包降級:
使用pacman的臨時文件(安裝本地包)降級
若是一個新包剛剛被安裝而且沒有刪除pacman cache,你能夠在/var/cache/pacman/pkg/
中找到較早版本. 安裝替換現有的版本.
pacman會處理依賴包但不會處理依賴庫的版本衝突。若是一個其依賴庫因該包降級須要降級,你須要手動降級這些包。
pacman -U /var/cache/pacman/pkg/package-old_version.pkg.tar.xz
使用遠程包(安裝遠程包)降級
pacman -U http://www.example.com/repo/package-old_version.pkg.tar.xz
1
2# elinuxboy @ mjro18xfce in ~ [7:53:20]
3$ sudo pacman -Sy
4[sudo] elinuxboy 的密碼:
5:: 正在同步軟件包數據庫...
6<br>
712/15 07:53:25 [NOTICE] Downloading 1 item(s)
8<br>
912/15 07:53:26 [NOTICE] 下載已完成:/var/lib/pacman/sync/core.db.part
10<br>
11下載結果:
12gid |stat|avg speed |path/URI
13======+====+===========+=======================================================
14e48729|OK | 589KiB/s|/var/lib/pacman/sync/core.db.part
15<br>
16狀態標識:
17(OK):下載已完成。
18<br>
1912/15 07:53:26 [NOTICE] Downloading 1 item(s)
20<br>
2112/15 07:53:26 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/core/x86_64/core.db.sig
22Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/core/x86_64/core.db.sig
23 -> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到資源
24<br>
2512/15 07:53:26 [NOTICE] GID 爲 3ec1fe753480d611 的下載項未完成:/var/lib/pacman/sync/core.db.sig.part
26<br>
27下載結果:
28gid |stat|avg speed |path/URI
29======+====+===========+=======================================================
303ec1fe|ERR | 0B/s|/var/lib/pacman/sync/core.db.sig.part
31<br>
32狀態標識:
33(ERR):發生錯誤。
34<br>
35從新啓動aria2,自動繼續下載文件
36若是發生任何錯誤,請參閱日誌文件。要了解詳細信息,請在 help/man 頁面中參閱「-l」選項。
37<br>
3812/15 07:53:28 [NOTICE] Downloading 1 item(s)
39[#58174d 1.7MiB/1.8MiB(95%) CN:1 DL:1.0MiB]
4012/15 07:53:30 [NOTICE] 下載已完成:/var/lib/pacman/sync/extra.db.part
41<br>
42下載結果:
43gid |stat|avg speed |path/URI
44======+====+===========+=======================================================
4558174d|OK | 1.0MiB/s|/var/lib/pacman/sync/extra.db.part
46<br>
47狀態標識:
48(OK):下載已完成。
49<br>
5012/15 07:53:30 [NOTICE] Downloading 1 item(s)
51<br>
5212/15 07:53:31 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/extra/x86_64/extra.db.sig
53Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/extra/x86_64/extra.db.sig
54 -> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到資源
55<br>
5612/15 07:53:31 [NOTICE] GID 爲 5da8892ce4724c98 的下載項未完成:/var/lib/pacman/sync/extra.db.sig.part
57<br>
58下載結果:
59gid |stat|avg speed |path/URI
60======+====+===========+=======================================================
615da889|ERR | 0B/s|/var/lib/pacman/sync/extra.db.sig.part
62<br>
63狀態標識:
64(ERR):發生錯誤。
65<br>
66從新啓動aria2,自動繼續下載文件
67若是發生任何錯誤,請參閱日誌文件。要了解詳細信息,請在 help/man 頁面中參閱「-l」選項。
68<br>
6912/15 07:53:33 [NOTICE] Downloading 1 item(s)
70[#d66d80 4.5MiB/5.0MiB(90%) CN:1 DL:0.9MiB]
7112/15 07:53:38 [NOTICE] 下載已完成:/var/lib/pacman/sync/community.db.part
72<br>
73下載結果:
74gid |stat|avg speed |path/URI
75======+====+===========+=======================================================
76d66d80|OK | 1.0MiB/s|/var/lib/pacman/sync/community.db.part
77<br>
78狀態標識:
79(OK):下載已完成。
80<br>
8112/15 07:53:38 [NOTICE] Downloading 1 item(s)
82<br>
8312/15 07:53:38 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/community/x86_64/community.db.sig
84Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/community/x86_64/community.db.sig
85 -> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到資源
86<br>
8712/15 07:53:38 [NOTICE] GID 爲 44b66925e8f1286f 的下載項未完成:/var/lib/pacman/sync/community.db.sig.part
88<br>
89下載結果:
90gid |stat|avg speed |path/URI
91======+====+===========+=======================================================
9244b669|ERR | 0B/s|/var/lib/pacman/sync/community.db.sig.part
93<br>
94狀態標識:
95(ERR):發生錯誤。
96<br>
97從新啓動aria2,自動繼續下載文件
98若是發生任何錯誤,請參閱日誌文件。要了解詳細信息,請在 help/man 頁面中參閱「-l」選項。
99<br>
10012/15 07:53:40 [NOTICE] Downloading 1 item(s)
101<br>
10212/15 07:53:41 [NOTICE] 下載已完成:/var/lib/pacman/sync/multilib.db.part
103<br>
104下載結果:
105gid |stat|avg speed |path/URI
106======+====+===========+=======================================================
107a00c29|OK | 722KiB/s|/var/lib/pacman/sync/multilib.db.part
108<br>
109狀態標識:
110(OK):下載已完成。
111<br>
11212/15 07:53:41 [NOTICE] Downloading 1 item(s)
113<br>
11412/15 07:53:41 [ERROR] CUID#7 - Download aborted. URI=https://mirrors.ustc.edu.cn/manjaro/stable/multilib/x86_64/multilib.db.sig
115Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://mirrors.ustc.edu.cn/manjaro/stable/multilib/x86_64/multilib.db.sig
116 -> [HttpSkipResponseCommand.cc:219] errorCode=3 未找到資源
117<br>
11812/15 07:53:41 [NOTICE] GID 爲 96eb7b68d9be8b5d 的下載項未完成:/var/lib/pacman/sync/multilib.db.sig.part
119<br>
120下載結果:
121gid |stat|avg speed |path/URI
122======+====+===========+=======================================================
12396eb7b|ERR | 0B/s|/var/lib/pacman/sync/multilib.db.sig.part
124<br>
125狀態標識:
126(ERR):發生錯誤。
127<br>
128從新啓動aria2,自動繼續下載文件
129若是發生任何錯誤,請參閱日誌文件。要了解詳細信息,請在 help/man 頁面中參閱「-l」選項。
130<br>
131
xxx.db.sig 缺失是 database 的簽名缺失,這是正常的,如今都只驗證 package 的簽名,database 都不簽名了。
在官方倉庫和archlinuxcn中文社區庫裏已經沒有xxx.db.sig文件了,因此固然下載不到。
1......
2error: could not register 'archlinuxcn' database (database already registered)
3error: could not register 'archlinuxcn' database (database already registered)
4error: could not register 'archlinuxcn' database (database already registered)
5could not register 'archlinuxcn' database (database already registered)
6錯誤:沒法註冊 'archlinuxcn' 數據庫 (數據庫已登記)
7錯誤:沒法註冊 'archlinuxcn' 數據庫 (數據庫已登記)
8錯誤:沒法註冊 'archlinuxcn' 數據庫 (數據庫已登記)
9......
該問題通常出如今添加archlinuxcn中文社區庫的時候添加錯文件了,應該是在這個文件「==/etc/pacman.conf==」後面添加archlinuxcn中文社區庫,而不是在這個「/etc/pacman.d/mirrorlist」文件後添加。
1
2#
3# /etc/pacman.conf
4#
5# See the pacman.conf(5) manpage for option and repository directives
6<br>
7#
8# GENERAL OPTIONS
9#
10[options]
11# The following paths are commented out with their default values listed.
12# If you wish to use different paths, uncomment and update the paths.
13#RootDir = /
14#DBPath = /var/lib/pacman/
15CacheDir = /var/cache/pacman/pkg/
16#LogFile = /var/log/pacman.log
17#GPGDir = /etc/pacman.d/gnupg/
18#HookDir = /etc/pacman.d/hooks/
19HoldPkg = pacman glibc manjaro-system
20# If upgrades are available for these packages they will be asked for first
21SyncFirst = manjaro-system archlinux-keyring manjaro-keyring
22#XferCommand = /usr/bin/curl -C - -f %u > %o
23#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
24# aria2c 多線程多連接
25#XferCommand = /usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 -d $(dirname %o) -o $(basename %o) %u
26#CleanMethod = KeepInstalled
27#UseDelta = 0.7
28Architecture = auto
29# 下載進度條吃豆子方式
30ILoveCandy
31<br>
32# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
33#IgnorePkg =
34#IgnoreGroup =
35<br>
36#NoUpgrade =
37#NoExtract =
38<br>
39# Misc options
40#UseSyslog
41# 彩色輸出
42Color
43#TotalDownload
44# We cannot check disk space from within a chroot environment
45CheckSpace
46# 升級前對比版本
47VerbosePkgLists
48<br>
49# By default, pacman accepts packages signed by keys that its local keyring
50# trusts (see pacman-key and its man page), as well as unsigned packages.
51SigLevel = Required DatabaseOptional
52LocalFileSigLevel = Optional
53#RemoteFileSigLevel = Required
54<br>
55# NOTE: You must run `pacman-key --init` before first using pacman; the local
56# keyring can then be populated with the keys of all official Manjaro Linux
57# packagers with `pacman-key --populate archlinux manjaro`.
58<br>
59#
60# REPOSITORIES
61# - can be defined here or included from another file
62# - pacman will search repositories in the order defined here
63# - local/custom mirrors can be added here or in separate files
64# - repositories listed first will take precedence when packages
65# have identical names, regardless of version number
66# - URLs will have $repo replaced by the name of the current repo
67# - URLs will have $arch replaced by the name of the architecture
68#
69# Repository entries are of the format:
70# [repo-name]
71# Server = ServerName
72# Include = IncludePath
73#
74# The header [repo-name] is crucial - it must be present and
75# uncommented to enable the repo.
76#
77<br>
78# The testing repositories are disabled by default. To enable, uncomment the
79# repo name header and Include lines. You can add preferred servers immediately
80# after the header, and they will be used before the default mirrors.
81<br>
82[core]
83SigLevel = PackageRequired
84Include = /etc/pacman.d/mirrorlist
85<br>
86[extra]
87SigLevel = PackageRequired
88Include = /etc/pacman.d/mirrorlist
89<br>
90[community]
91SigLevel = PackageRequired
92Include = /etc/pacman.d/mirrorlist
93<br>
94# If you want to run 32 bit applications on your x86_64 system,
95# enable the multilib repositories as required here.
96<br>
97[multilib]
98SigLevel = PackageRequired
99Include = /etc/pacman.d/mirrorlist
100<br>
101# An example of a custom package repository. See the pacman manpage for
102# tips on creating your own repositories.
103#[custom]
104#SigLevel = Optional TrustAll
105#Server = file:///home/custompkgs
106<br>
107# archlinuxcn中文社區庫清華大學鏡像
108[archlinuxcn]
109Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
110<br>
111
1
2#
3# /etc/makepkg.conf
4#
5<br>
6#########################################################################
7# SOURCE ACQUISITION
8#########################################################################
9#
10#-- The download utilities that makepkg should use to acquire sources
11# Format: 'protocol::agent'
12#DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
13# 'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
14# 'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
15# 'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
16# 'rsync::/usr/bin/rsync --no-motd -z %u %o'
17# 'scp::/usr/bin/scp -C %u %o')
18<br>
19# axel 單線程多連接
20#DLAGENTS=('file::/usr/bin/axel -a -n 16 %u -o %o'
21# 'ftp::/usr/bin/axel -a -n 16 %u -o %o'
22# 'http::/usr/bin/axel -a -n 16 %u -o %o'
23# 'https::/usr/bin/axel -a -n 16 %u -o %o'
24# 'rsync::/usr/bin/rsync --no-motd -z %u %o'
25# 'scp::/usr/bin/scp -C %u %o')
26<br>
27# aria2c 多線程多連接
28DLAGENTS=('file::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
29 'ftp::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
30 'http::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
31 'https::/usr/bin/aria2c --allow-overwrite=true --log-level=error -l aria2c-error.log -c -m2 -x 8 -s 8 -j 8 %u -o %o'
32 'rsync::/usr/bin/rsync --no-motd -z %u %o'
33 'scp::/usr/bin/scp -C %u %o')
34<br>
35# Other common tools:
36# /usr/bin/snarf
37# /usr/bin/lftpget -c
38# /usr/bin/wget
39<br>
40#-- The package required by makepkg to download VCS sources
41# Format: 'protocol::package'
42VCSCLIENTS=('bzr::bzr'
43 'git::git'
44 'hg::mercurial'
45 'svn::subversion')
46<br>
47#########################################################################
48# ARCHITECTURE, COMPILE FLAGS
49#########################################################################
50#
51CARCH="x86_64"
52CHOST="x86_64-pc-linux-gnu"
53<br>
54#-- Compiler and Linker Flags
55# -march (or -mcpu) builds exclusively for an architecture
56# -mtune optimizes for an architecture, but builds for whole processor family
57CPPFLAGS="-D_FORTIFY_SOURCE=2"
58CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
59CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt"
60LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
61#-- Make Flags: change this for DistCC/SMP systems
62#MAKEFLAGS="-j2"
63#-- Debugging flags
64DEBUG_CFLAGS="-g -fvar-tracking-assignments"
65DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
66<br>
67#########################################################################
68# BUILD ENVIRONMENT
69#########################################################################
70#
71# Defaults: BUILDENV=(!distcc color !ccache check !sign)
72# A negated environment option will do the opposite of the comments below.
73#
74#-- distcc: Use the Distributed C/C++/ObjC compiler
75#-- color: Colorize output messages
76#-- ccache: Use ccache to cache compilation
77#-- check: Run the check() function if present in the PKGBUILD
78#-- sign: Generate PGP signature file
79#
80BUILDENV=(!distcc color !ccache check !sign)
81#
82#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
83#-- specify a space-delimited list of hosts running in the DistCC cluster.
84#DISTCC_HOSTS=""
85#
86#-- Specify a directory for package building.
87#BUILDDIR=/tmp/makepkg
88<br>
89#########################################################################
90# GLOBAL PACKAGE OPTIONS
91# These are default values for the options=() settings
92#########################################################################
93#
94# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
95# A negated option will do the opposite of the comments below.
96#
97#-- strip: Strip symbols from binaries/libraries
98#-- docs: Save doc directories specified by DOC_DIRS
99#-- libtool: Leave libtool (.la) files in packages
100#-- staticlibs: Leave static library (.a) files in packages
101#-- emptydirs: Leave empty directories in packages
102#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
103#-- purge: Remove files specified by PURGE_TARGETS
104#-- debug: Add debugging flags as specified in DEBUG_* variables
105#
106OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
107<br>
108#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
109INTEGRITY_CHECK=(md5)
110#-- Options to be used when stripping binaries. See `man strip' for details.
111STRIP_BINARIES="--strip-all"
112#-- Options to be used when stripping shared libraries. See `man strip' for details.
113STRIP_SHARED="--strip-unneeded"
114#-- Options to be used when stripping static libraries. See `man strip' for details.
115STRIP_STATIC="--strip-debug"
116#-- Manual (man and info) directories to compress (if zipman is specified)
117MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
118#-- Doc directories to remove (if !docs is specified)
119DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
120#-- Files to be removed from all packages (if purge is specified)
121PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
122#-- Directory to store source code in for debug packages
123DBGSRCDIR="/usr/src/debug"
124<br>
125#########################################################################
126# PACKAGE OUTPUT
127#########################################################################
128#
129# Default: put built package and cached source in build directory
130#
131#-- Destination: specify a fixed directory where all packages will be placed
132#PKGDEST=/home/packages
133#-- Source cache: specify a fixed directory where source files will be cached
134#SRCDEST=/home/sources
135#-- Source packages: specify a fixed directory where all src packages will be placed
136#SRCPKGDEST=/home/srcpackages
137#-- Log files: specify a fixed directory where all log files will be placed
138#LOGDEST=/home/makepkglogs
139#-- Packager: name/email of the person or organization building packages
140#PACKAGER="John Doe <john@doe.com>"
141#-- Specify a key to use for package signing
142#GPGKEY=""
143<br>
144#########################################################################
145# COMPRESSION DEFAULTS
146#########################################################################
147#
148COMPRESSGZ=(gzip -c -f -n)
149COMPRESSBZ2=(bzip2 -c -f)
150COMPRESSXZ=(xz -c -z -)
151COMPRESSLRZ=(lrzip -q)
152COMPRESSLZO=(lzop -q)
153COMPRESSZ=(compress -c -f)
154<br>
155#########################################################################
156# EXTENSION DEFAULTS
157#########################################################################
158#
159# WARNING: Do NOT modify these variables unless you know what you are
160# doing.
161#
162PKGEXT='.pkg.tar.xz'
163SRCEXT='.src.tar.gz'
164<br>
165
1
2##
3## Manjaro Linux custom mirrorlist
4## Generated on 2018-12-15 07:14
5##
6## Please use 'pacman-mirrors -id' to reset custom mirrorlist
7## Please use 'pacman-mirrors -c all' to reset custom mirrorlist
8## To remove custom config run 'pacman-mirrors -c all'
9##
10<br>
11## Country : China
12Server = https://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$arch
13<br>
14## Country : China
15#Server = https://mirrors.ustc.edu.cn/manjaro/stable/$repo/$arch
16<br>
17## Country : China
18#Server = https://mirrors.sjtug.sjtu.edu.cn/manjaro/stable/$repo/$arch
19<br>
20## Country : China
21#Server = https://mirrors.zju.edu.cn/manjaro/stable/$repo/$arch
22<br>
23
1
2# If you come from bash you might have to change your $PATH.
3# export PATH=$HOME/bin:/usr/local/bin:$PATH
4<br>
5# Path to your oh-my-zsh installation.
6 export ZSH="/home/elinuxboy/.oh-my-zsh"
7<br>
8# Set name of the theme to load --- if set to "random", it will
9# load a random theme each time oh-my-zsh is loaded, in which case,
10# to know which specific one was loaded, run: echo $RANDOM_THEME
11# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
12ZSH_THEME="ys"
13<br>
14# Set list of themes to pick from when loading at random
15# Setting this variable when ZSH_THEME=random will cause zsh to load
16# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
17# If set to an empty array, this variable will have no effect.
18# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
19<br>
20# Uncomment the following line to use case-sensitive completion.
21# CASE_SENSITIVE="true"
22<br>
23# Uncomment the following line to use hyphen-insensitive completion.
24# Case-sensitive completion must be off. _ and - will be interchangeable.
25# HYPHEN_INSENSITIVE="true"
26<br>
27# Uncomment the following line to disable bi-weekly auto-update checks.
28# DISABLE_AUTO_UPDATE="true"
29<br>
30# Uncomment the following line to change how often to auto-update (in days).
31# export UPDATE_ZSH_DAYS=13
32<br>
33# Uncomment the following line to disable colors in ls.
34# DISABLE_LS_COLORS="true"
35<br>
36# Uncomment the following line to disable auto-setting terminal title.
37# DISABLE_AUTO_TITLE="true"
38<br>
39# Uncomment the following line to enable command auto-correction.
40# ENABLE_CORRECTION="true"
41<br>
42# Uncomment the following line to display red dots whilst waiting for completion.
43# COMPLETION_WAITING_DOTS="true"
44<br>
45# Uncomment the following line if you want to disable marking untracked files
46# under VCS as dirty. This makes repository status check for large repositories
47# much, much faster.
48# DISABLE_UNTRACKED_FILES_DIRTY="true"
49<br>
50# Uncomment the following line if you want to change the command execution time
51# stamp shown in the history command output.
52# You can set one of the optional three formats:
53# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
54# or set a custom format using the strftime function format specifications,
55# see 'man strftime' for details.
56# HIST_STAMPS="mm/dd/yyyy"
57# 歷史命令日期顯示格式
58HIST_STAMPS="yyyy-mm-dd"
59<br>
60# Would you like to use another custom folder than $ZSH/custom?
61# ZSH_CUSTOM=/path/to/new-custom-folder
62<br>
63# Which plugins would you like to load?
64# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
65# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
66# Example format: plugins=(rails git textmate ruby lighthouse)
67# Add wisely, as too many plugins slow down shell startup.
68# z命令快速跳轉目錄 x命令解壓一切文件 命令行能夠直接google
69plugins=(
70 git z zsh-autosuggestions extract web-search zsh-syntax-highlighting
71)
72<br>
73source $ZSH/oh-my-zsh.sh
74<br>
75# User configuration
76<br>
77# export MANPATH="/usr/local/man:$MANPATH"
78<br>
79# You may need to manually set your language environment
80# export LANG=en_US.UTF-8
81<br>
82# Preferred editor for local and remote sessions
83# if [[ -n $SSH_CONNECTION ]]; then
84# export EDITOR='vim'
85# else
86# export EDITOR='mvim'
87# fi
88<br>
89# Compilation flags
90# export ARCHFLAGS="-arch x86_64"
91<br>
92# ssh
93# export SSH_KEY_PATH="~/.ssh/rsa_id"
94<br>
95# Set personal aliases, overriding those provided by oh-my-zsh libs,
96# plugins, and themes. Aliases can be placed here, though oh-my-zsh
97# users are encouraged to define aliases within the ZSH_CUSTOM folder.
98# For a full list of active aliases, run `alias`.
99#
100# Example aliases
101# alias zshconfig="mate ~/.zshrc"
102# alias ohmyzsh="mate ~/.oh-my-zsh"
103# autojump自動跳轉插件
104. /usr/share/autojump/autojump.zsh
105<br>
106#自動補全插件
107#source ~/.oh-my-zsh/plugins/incr/incr-0.2.zsh
108<br>
109# 自動更新的時間間隔,單位是天,這裏設置 30 天更新一次
110export UPDATE_ZSH_DAYS=1
111<br>
112# zsh-syntax-highlighting語法高亮插件
113source ${ZSH}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
114<br>
115# 設置 gcc/g++ 別名
116alias gcc='gcc -fdiagnostics-color=auto'
117alias g++='g++ -fdiagnostics-color=auto'
118<br>
119# 設置 git 命令自動補全 ,如:git co+敲兩次tab鍵
120#if [ -f ~/.git-completion.bash ]; then
121# . ~/.git-completion.bash
122#fi
123<br>
124# 加載vgz驅動和utf8支持
125alias zhcon='zhcon --utf8'
126<br>
127alias cat='bat'
128<br>
129# 設置環境變量LFS
130#export LFS=/mnt/lfs
131<br>
132