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
未完代序…