ubuntu18重装

1、更新源
sudo vi /etc/apt/sources.list

# 阿里源

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

进行更新

sudo apt update
sudo apt upgrade

2、安装vim

sudo apt install vim

使用vim一键配置

wget -qO- https://raw.github.com/ma6174/vim/master/setup.sh | sh -x

3、 安装google

到google官网下载安装包,进入文件夹

sudo dpkg -i ***.deb

4、自动卸载不要的文件

sudo apt autoremove

4、干掉Nouveau安装Linux Nvidia显卡驱动

此方法可以解决启动闪屏问题

先卸载已经存在的驱动版本

sudo apt-get remove --purge nvidia*

需要禁用 nouveau,只有在禁用掉 nouveau 后才能顺利安装 NVIDIA 显卡驱动

sudo vim /etc/modprobe.d/blacklist.conf
//添加如下命令,是将Ubuntu自带的显卡驱动加入黑名单
blacklist nouveau
//还需执行以下命令使禁用 nouveau 真正生
sudo update-initramfs -u

使用标准Ubuntu 仓库进行自动化安装NVIDIA 显卡驱动

首先,检测你的NVIDIA显卡型号和推荐的驱动程序的模型。在命令行中输入如下命令:

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001050sv000017AAsd0000397Fbc03sc00i00
vendor   : NVIDIA Corporation
model    : GF119M [GeForce GT 520M]
driver   : nvidia-driver-390 - distro non-free recommended
driver   : nvidia-340 - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

从输出结果可以看到,目前系统已连接Nvidia GeFrand GTX 520M显卡,建议安装驱动程序是 nvidia-390版本的驱动。如果您同意该建议,请再次使用Ubuntu驱动程序命令来安装所有推荐的驱动程序。

sudo ubuntu-drivers autoinstall

最后重启

sudo reboot

测试nvidia 驱动是否成功安装,使用以下命令:

nvidia-smi   
nvidia-settings

 

你可能感兴趣的:(linux)