Manjaro安装配置指南

随声附和 提交于 2020-01-13 04:07:15

由于可能会有偶尔重装系统的需要,而每次配置都丢三落四,浪费时间,因此整理了自己需要的配置,一直会继续更新的

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 立即重启
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!