原創文,最初發佈於 szhshp的第三邊境研究所 , 轉載請註明html
PowerShell裏面執行git
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
重啓電腦github
sudo mv /etc/apt/sources.list /etc/apt/source.list.bak
sudo vim /etc/apt/sources.list
使用下面的內容shell
(注意這個只是給Ubuntu16.04版本使用, 你安裝的時候應該默認就是這個版本)ubuntu
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源碼 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # Canonical 合做夥伴和附加 deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main
而後bash方面更新:vim
sudo apt-get update sudo apt-get upgrade
zsh的安裝都是老生常談了windows
簡單的安裝直接看這篇文章bash
固然oh-my-zsh也要一塊兒安裝測試
這一部分和純ubuntu系統的設置不太同樣spa
安裝zsh以後, 首先查看一下你當前的shell
echo $SHELL
應該會顯示
/bin/bash
畢竟用各類方法切換不成功, 根據相關Issue, 這個時候就應該編輯這個文件:
vi ~/.bashrc
在這個文件末尾加上
bash -c zsh
這樣就能夠自動進入zsh了
這是一個很奇怪的問題, 根據相關Issue, zsh但願調整進程的優先度,所以致使的錯誤
須要在.bashrc
文件最後加上一句
unsetopt BG_NICE
而後從新啓動bash便可解決問題
感受想配置起來也不是這麼容易呀