ubuntu20.04機器學習及日常使用環境搭建

ubuntu20.04機器學習及日常使用環境搭建

分區

/usr 70G 邏輯分區 ext4
/swap 18G 交換空間 swap
/boot 1G 邏輯分區 ext4
/ 20G 邏輯分區 ext4
/efi 1G 邏輯分區 ext4
/tmp 5G 邏輯分區 ext4
/home left all 邏輯分區 ext4

換源

在這裏插入圖片描述
在這裏插入圖片描述

設置網絡環境

參考 http://keyblog.cn/article-249.html
或 直接使用appimage

在這裏插入圖片描述

使用sudo執行命令走proxy代理不生效問題

問題描述:
在Linux系統中,在/etc/profile中設置了全局http_proxy代理或者在某個用戶下設置了http_proxy代理。使用普通用戶執行命令時代理是生效的,但是,在使用sudo執行命令的時候代理卻不生效。

解決方法:
在/etc/sudoers中加入:

Defaults env_keep += “http_proxy https_proxy no_proxy”

安裝google chrome瀏覽器

到 https://www.google.cn/chrome/ 下載

sudo dpkg -i google-chrome-stable_current_amd64.deb

雙系統下時間不對的問題

timedatectl set-local-rtc 1 --adjust-system-clock

更換root密碼

sudo passwd root

安裝NVIDIA驅動

在這裏插入圖片描述

禁止ubuntu更新內核

查看已安裝內核

dpkg --get-selections |grep linux-image

查看正在使用的內核

uname -a

刪除舊內核

sudo apt-get remove linux-image-4.10.0-28-generic
sudo apt-get remove linux-image-extra-4.10.0-28-generic

或用這個命令移除

sudo dpkg --purge linux-image-4.4.0-21-generic

禁止更新內核,需時間來驗證

sudo apt-mark hold linux-image-4.13.0-31-generic
sudo apt-mark hold linux-image-extra-4.13.0-31-generic

終端美化

https://kifarunix.com/install-and-setup-zsh-and-oh-my-zsh-on-ubuntu-20-04/

安裝oh-my-zsh

sudo apt-get install zsh
sudo apt-get install git
sudo wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
chsh -s /bin/zsh\

終端變成這樣:
在這裏插入圖片描述

如沒有,註銷重新登陸一下。(必須

zsh-syntax-highlighting

作用 平常用的ls、cd 等命令輸入正確會綠色高亮顯示,輸入錯誤會顯示其他的顏色。

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

在 ~/.zshrc 中配置

plugins=(其他的插件 zsh-syntax-highlighting)

使配置生效

source ~/.zshrc

zsh-autosuggestions

輸入命令時,會給出建議的命令(灰色部分)按鍵盤 → 補全

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

在 ~/.zshrc 中配置

plugins=(其他的插件 zsh-autosuggestions)

使配置生效

source ~/.zshrc

未完代序…

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