Manjaro安裝後的配置

換源

sudo pacman-mirrors -i -c China -m rank
sudo nano /etc/pacman.conf
末尾添加

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

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

Nvidia Prime與intel核顯切換

https://blog.csdn.net/sherpahu/article/details/103193009
不切換關機會卡死

rEFInd

sudo pacman -S refind-efi
refind-install

常用軟件

搜狗輸入法(真正能用的方法)

按照網上排得最靠前的方法都會出現很多問題。
https://www.manjaro.top/?id=12
這個方法可行。

sudo pacman -S fcitx-sogoupinyin fcitx-im fcitx-configtool yay
yay -S aur/fcitx-qt4
sudo nano /etc/environment

寫入

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

作者: 紫色妖姬半島
鏈接: https://liyepan.github.io//post/manjaro-an-zhuang-sou-gou-shu-ru-fa

Caps Lock切換中英文輸入

設置-›硬件-›輸入設備中,鍵盤佈局添加英文,高級中設置“大寫鎖定也是Ctrl鍵”,同時添加Capslock爲將fcitx的切換鍵。在這裏插入圖片描述在這裏插入圖片描述

ZSH

安裝ZSH:sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安裝zsh-autosuggestions:git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
修改~/.zshrc

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/home/gz/.oh-my-zsh"
export PATH="/home/gz/anaconda3/bin:$PATH"
export PATH="/home/gz/analog_flavor_eval/bin:$PATH"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
# ZSH_THEME="robbyrussell"
ZSH_THEME="ys"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
	git
	zsh-autosuggestions
)

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 vizsh="micro ~/.zshrc"
alias rezsh="source ~/.zshrc"
alias nv="nvidia-smi"
alias wcnv="watch -n 10 nvidia-smi"
alias newyuan="sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring"
alias mt="sudo mount -t ntfs /dev/sdb2 /mnt/file"
alias proxy="export http_proxy=http://127.0.0.1:1080 && https_proxy=http://127.0.0.1:1080"
alias unproxy="unset http_proxy && unset https_proxy"
alias dcstart="systemctl start docker"
alias dcstop="systemctl stop docker"

micro編輯器

默認使用類似Windows的快捷鍵,ctrl+c複製ctrl+v粘貼很爽
yay -S micro

深度學習環境配置

Anaconda

在Anaconda官網下載Anaconda
目前最新的Anaconda支持Tensorflow2.0
sh Anaconda3-xxx.sh
換源
修改~/.condarc(沒有就新建一個)

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

清華
上交
有的時候鏡像在同步就可能用不了了,可以換一下。
還可以使用魔法直接從官網下載:

cuda,cudnn配置

方法一:
從conda安裝,安裝比較快佔用位置也小,可以使用tensorflow、pytorch、catboost,lightgbm、xgboost沒法用。

conda install cudatoolkit=10.0
conda install cudnn=7.6

方法二:
使用pacman安裝sudo pacman+-S+cuda+cudnn
降級sudo pacman -U http://mirrors.sohu.com/archlinux/community/os/x86_64/cuda-10.0.130-2-x86_64.pkg.tar.xz
截至2019/11,tensorflow只能使用cuda10.0

lightgbm gpu

用方式二安裝cuda,cudnn

git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM                                                                                               
mkdir build ; cd build
cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/opt/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/opt/cuda/include/ ..
make -j$(nproc) 
cd ../python-package
python setup.py install --precompile

使用pacman安裝的cuda位置在/opt/cuda/中,依據具體情況修改

VScode C++配置

微軟的產品總是讓人用得火冒三丈。。。
安裝Vscode:sudo pacman -S visual-studio-code-bin
按照這位的教程或者https://blog.csdn.net/Rem_boot/article/details/89391798在工作文件夾裏新建.vscode, 新建幾個json文件。
安裝Code Runner,按照這個教程配置Code Runner使之與終端結合。
Ctrl+Alt+N就可以運行了。

nodejs npm

sudo pacman -S nodejs npm
換源npm config set registry https://registry.npm.taobao.org
下載cnpm:sudo npm install -g cnpm --registry=https://registry.npm.taobao.org

安裝fanyi

sudo cnpm i -g fanyi
sudo pacman -S festival festival-english

安裝tldr

sudo cnpm i -g tldr

微信

https://github.com/countstarlight/deepin-wine-wechat-arch/releases
下載2.7的最新版,2.8及以上有bug
https://github.com/countstarlight/deepin-wine-wechat-arch/releases/tag/v2.7.1.88-1
Github下載慢可以到https://g.widora.cn/下載
安裝
再參考https://github.com/countstarlight/deepin-wine-wechat-arch#%E6%B6%88%E9%99%A4%E9%98%B4%E5%BD%B1%E8%BE%B9%E6%A1%86
消除KDE下的陰影邊框
WINEPREFIX=~/.deepinwine/Deepin-WeChat /usr/bin/wine winecfg設置版本爲XP,就可以打開公衆號文章了

其他

  1. 網易雲音樂:
  2. QQ:添加和刪除軟件裏下載qq-linux,2019/10/24,QQ linux版又復活了,文件傳輸不能用,可以給小號發消息實現傳文件的功能。
  3. 微信:用Deepin-wine效果還還行,wine4.18不能使用中文輸入法,這是wine的bug,wine4.20修復了,我更新了wine之後就打不開了(通過rm -rf ~/.deepinwine/Deepin-WeChat解決),AUR上說可以回退到4.16或者升級4.20。這個版本打開公衆號的文章後會閃退,按照Deepin論壇的設置默認瀏覽器打開即可。
    網頁版可以湊合着用,容易被封,在微信團隊裏找客服反饋可以解封。
    字體過小修改DPI:WINEPREFIX=~/.deepinwine/Deepin-WeChat /usr/bin/wine winecfg改爲96
  4. Chorme:sudo pacman -S google-chrome,Chrome昨天更新恢復了“關閉其他標籤”的功能。
  5. Typora:添加和刪除軟件裏下載
  6. flameshot:截圖,yay -S flameshot,系統設置添加自定義快捷鍵,命令:flameshot gui
  7. WPS:添加和刪除軟件裏下載,還可以在微軟的網頁版office裏查看和編輯office,都不太好用,編輯Word、PPT還是去Win10吧。字體缺失的解決https://zhuanlan.zhihu.com/p/31848590
  8. KDE Connect聽說很不錯,但是我在校園網下手機電腦連接同一Wifi分配的ip不同沒法用,我明明記得在我大一上學期還可以用FTP進行手機、電腦的文件傳輸,可是後來就用不了了,可能校園網的局域網策略改變了吧。
  9. debtap:很多軟件只有Debian系的包,使用debtap可以在Manjaro上安裝。yay -S debtap,sudo debtap -u,sudo debtap xxxx.deb
  10. CSV圖形界面閱讀器:在Tad官網下載deb包,之後使用debtap安裝sudo debtap tad_0.9.0_amd64.deb功能很強大。在這裏插入圖片描述
  11. firefox配置:
    • 縮放:地址欄about:configlayout.css.devPixelsPerPx
    • 雙擊關閉標籤頁:about:configbrowser.tabs.closeTabByDblclick
    • 地址欄點擊全選:about:configbrowser.urlbar.clickSelectsAll
    • 多線程下載管理器:about:confignetwork.http.max-persistent-connections-per-server,network.http.max-persistent-connections-per-proxy
  12. yakuake配置:
    取消讓窗口管理器顯示動畫,防止出現鼠標焦點不在yakuake中時yakuake縮回的閃動。 在這裏插入圖片描述
  13. matplotlib亂碼:https://blog.csdn.net/qq_43497702/article/details/99892701

其餘的Manjaro KDE默認的工具都比較好用,比如說Alt+F2搜索文件快速打開應用程序(但不能使用拼音索引很煩),Okular看pdf很舒服。
很多時候很無奈,騰訊、阿里這種大公司都很排斥Linux,向釘釘提出添加Linux版的需求被無情拒絕,微信還總是封掉Linux下的網頁版,QQ在十年只推出了兩個版本。
華爲Mate14推出了默認Deepin的版本銷量還有一些,但願以後的Linux生態越來越好。

目錄路徑修改

只能手動改,修改默認語言好像沒有用。
https://blog.csdn.net/jeffrey_li/article/details/54947502
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章