標籤:class 導致 span sop targe doc ted update rest
原創文,最初發佈於 szhshp的第三邊境研究所 , 轉載請註明
安裝
PowerShell裡面執行
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
重啟電腦
配置apt-get換源原檔案重新命名備份
sudo mv /etc/apt/sources.list /etc/apt/source.list.bak
編輯源列表檔案
sudo vim /etc/apt/sources.list
使用下面的內容
(注意這個只是給Ubuntu16.04版本使用, 你安裝的時候應該預設就是這個版本)
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb 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 multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb-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 partnerdeb http://extras.ubuntu.com/ubuntu/ xenial main
然後bash方面更新:
sudo apt-get updatesudo apt-get upgrade
zsh
zsh的安裝都是老生常談了
簡單的安裝直接看這篇文章
當然oh-my-zsh也要一起安裝
無法將zsh作為預設shell
這一部分和純ubuntu系統的設定不太一樣
安裝zsh之後, 首先查看一下你當前的shell
echo $SHELL
應該會顯示
/bin/bash
畢竟用各種方法切換不成功, 根據相關Issue, 這個時候就應該編輯這個檔案:
vi ~/.bashrc
在這個檔案末尾加上
bash -c zsh
這樣就可以自動進入zsh了
autojump_chpwd:4:nice(5) failed: operation not permitted
這是一個很奇怪的問題, 根據相關Issue, zsh希望調整進程的優先度,因此導致的錯誤
需要在.bashrc
檔案最後加上一句
unsetopt BG_NICE
然後重新啟動bash即可解決問題
感覺想配置起來也不是這麼容易呀
參考文獻
- https://docs.microsoft.com/en-us/windows/wsl/install-win10
- https://www.cnblogs.com/gabin/p/6519352.html
- https://www.cnblogs.com/seayxu/p/5568830.html
- https://github.com/Microsoft/WSL/issues/1887
Bash on Windows各種配置