vim常用命令
- 全選(高亮顯示):按esc后千康,然后ggvG或者ggVG
- 全部復制:按esc后,然后ggyG
- 全部刪除:按esc后传透,然后dG
- 粘貼:插入模式下凄敢,ctrl+shift+v(wsl開啟ctrl+shift+c/v復制粘貼模式)
# /etc/apt/sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup # 復制一份備份
sudo vim /etc/apt/sources.list
# 在第一行的第一個位置,按esc庸追,輸入dG霍骄,全選刪除
# 因為在wsl中開啟了ctrl+shift+c/v復制粘貼模式,所以可以直接ctrl+c復制下邊的字符淡溯,在終端vim中按i進入插入模式读整,再按ctrl+shift+v粘貼
#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# 按esc,:wq血筑,寫入保存
sudo apt-get update # 更新源
sudo apt-get install package # 安裝包
sudo apt-get remove package # 刪除包
sudo apt-cache search package # 搜索軟件包
sudo apt-cache show package # 獲取包的相關信息绘沉,如說明、大小豺总、版本等
sudo apt-get install package --reinstall # 重新安裝包
sudo apt-get -f install # 修復安裝
sudo apt-get remove package --purge # 刪除包车伞,包括配置文件等
sudo apt-get build-dep package # 安裝相關的編譯環(huán)境
sudo apt-get upgrade # 更新已安裝的包
sudo apt-get dist-upgrade # 升級系統(tǒng)
sudo apt-cache depends package # 了解使用該包依賴那些包
sudo apt-cache rdepends package # 查看該包被哪些包依賴
sudo apt-get source package # 下載該包的源代碼
sudo apt-get clean && sudo apt-get autoclean # 清理無用的包
sudo apt-get check # 檢查是否有損壞的依賴
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者