1.Ubuntu20.04
1.1 apt 源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
1.2 terminal忽略大小写
该配置使terminal在tab补全的时候忽略大小写
- 用户目录下创建文件.inputrc
- 加入配置 set completion-ignore-case on
- 重启terminal
1.3 terminal显示git分支
在.bashrc中追加配置
function git_branch {
branch="`git branch 2>/dev/null | grep "^\*" | sed -e "s/^\*\ //"`"
if [ "${branch}" != "" ];then
if [ "${branch}" = "(no branch)" ];then
branch="(`git rev-parse --short HEAD`...)"
fi
echo " ($branch)"
fi
}
export PS1='\u@\h \[\033[01;36m\]\W\[\033[01;32m\]$(git_branch)\[\033[00m\] \$ '
2.显卡驱动
2.1 禁用nouveau
在系统禁用列表中追加禁用项
/etc/modprobe.d/blacklist.conf
添加 blacklist nouveau
使其生效
sudo update-initramfs -u
检验是否成功,无输出即成功
lsmod | grep nouveau
2.2 卸载旧的显卡驱动
sudo apt-get remove --purge nvidia*
3.CUDA11.1
3.1 卸载CUDA
cd /usr/local/cuda/bin
sudo ./cuda-uninstaller