Manjaro安裝配置指南

由於可能會有偶爾重裝系統的需要,而每次配置都丟三落四,浪費時間,因此整理了自己需要的配置,一直會繼續更新的

1.安裝

分區時選擇手動分區

掛載點 大小
/boot/efi 500M
/boot 1G
/ 剩餘所有

2.更新源

sudo pacman-mirrors -i -c China -m rank //更新鏡像排名,選擇最快的那一個(延遲小的那個)
sudo pacman -Syy //刷新
sudo pacman -S vim //先安裝vim,之後用的多
sudo vim /etc/pacman.conf

在這個文件的最後添加幾行:

[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

其中的網址根據之前選擇的源來選擇最快的:

## CDN (ipv4, http, https)
## aliyun
Server= http://mirrors.aliyun.com/archlinux/$arch

##上海交通大學
Server= https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch
## 浙江大學 (浙江杭州) (ipv4, ipv6, http, https)
## Added: 2017-06-05[archlinuxcn]
Server= https://mirrors.zju.edu.cn/archlinuxcn/$arch

## 中國科學技術大學 (ipv4, ipv6, http, https)[archlinuxcn]
Server= https://mirrors.ustc.edu.cn/archlinuxcn/$arch

## 清華大學 (ipv4, ipv6, http, https)[archlinuxcn]
Server= https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

## xTom (Hong Kong) (ipv4, ipv6, http, https)
## Added: 2017-09-18
## xTom Hong Kong Mirror[archlinuxcn]
Server= https://mirror.xtom.com.hk/archlinuxcn/$arch

## Unique Studio (湖北武漢) (ipv4, http, https)
## Added: 2017-08-02[archlinuxcn]
Server= https://mirrors.hustunique.com/archlinuxcn/$arch

## 上海科技大學 (上海) (ipv4, http, https)
## Added: 2016-04-07[archlinuxcn]
Server= https://mirrors-wan.geekpie.org/archlinuxcn/$arch

## 中國科學院開源軟件協會 (北京) (ipv4, http)
## Added: 2017-02-09[archlinuxcn]
Server= http://mirrors.opencas.org/archlinuxcn/$arch

## 電子科技大學凝聚網絡安全工作室 (ipv4, http)
## Added: 2016-05-28[archlinuxcn]
Server= http://mirrors.cnssuestc.org/archlinuxcn/$arch

## 網易 (ipv4, http)[archlinuxcn]
Server= http://mirrors.163.com/archlinux-cn/$arch

## 重慶大學 (ipv4, http)[archlinuxcn]
Server= http://mirrors.cqu.edu.cn/archlinuxcn/$arch

之後更新並安裝密鑰包和yay需要的包

sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring base-dev

安裝yay並設置源

sudo pacman -S yay && yay --save --aururl "https://aur.tuna.tsinghua.edu.cn"  

3.搜狗輸入法

sudo pacman -S fcitx-im fcitx-sogoupinyin fcitx-configtool fcitx-qt4

編輯/etc/environment,在文件末尾加入以下幾行

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

保存之後重啓,此時切換輸入法還是無法使用搜狗輸入法

sudo rm -rf .config/SogouPY && rm -rf /tmp./sogou* && rm -rf /tmp/fcitx-socket-:1

之後再次重啓

4.ohmyzsh

sudo pacman -S zsh curl wget

更改默認爲zsh

chsh -s /bin/zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

或者

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

或者

git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cd .oh-my-zsh/tools
sh install.sh

安裝插件

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
vim .zshrc

覆蓋插件之後的內容

plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias vi="vim"
alias update="sudo pacman -Syyu && yay -Syyu"
alias pacd="sudo pacman -S"
alias pacr="sudo pacman -Rs"
alias pacc="sudo pacman -Scc"
alias yayd="yay -S"
alias yayr="yay -Rns"
alias vnc-viewer="/home/ekko/my_app/VNC-Viewer-6.19.923-Linux-x64"
alias setproxy='export http_proxy="socks5://127.0.0.1:1080" && export https_proxy="socks5://127.0.0.1:1080"'
alias upload="./ekko/manjaro_config/upload.sh"
alias download="./ekko/manjaro_config/download.sh"
function sssh() { /home/ekko/my_app/Sakura_frpc_linux_amd64 --su=ekko --sp=amwplso0 --sid=$1;}

5.常用軟件

pacd neovim visual-studio-code-bin wps-office netease-cloud-music google-chrome nutstore typora deepin.com.qq.office arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib ttf-wps-fonts wine baidunetdisk-bin vlc
yayd youdao-dict nrf5x-command-line-tools nrfconnect-appimage nrf5x-sniffer xmind deepin.com.thunderspeed 

6.記錄移植

  1. 主題: .themes
  2. 插件: .local/share/gnome-shell
  3. vscode: .cache/vscode-cpptools/ .cache/VSCodeVim/ .vscode/ .config/Code
  4. chrome: .cache/google-chrome .config/google-chrome
  5. wine中文字體: .wine/drive_c/windows/Fonts
    在該目錄下執行
    regedit zh.reg
    

7.快捷鍵

key command
ctl+alt+t gnome-terminal
ctl+alt+q /opt/deepinwine/apps/Deepin-TIM/run.sh
ctl+alt+s /opt/deepinwine/apps/Deepin-ThunderSpeed/run.sh
ctl+alt+d youdao-dict
ctl+shift+esc gnome-system-monitor

8.服務配置

  1. ssh
    systemctl enable sshd.service 開機啓動
    systemctl start sshd.service 立即啓動
    systemctl restart sshd.service 立即重啓
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章