1、ubuntu18.04换国内源
打开/etc/apt/sources.list
sudo nano /etc/apt/sources.list
将原有的数据注释掉,换上国内镜像
阿里云源
1 | deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse |
清华源
1 | deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse |
中科大源
1 | deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse |
更改完成之后执行以下命令
1 | sudo apt update |
2、安装Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
3、unrar解压带密码压缩包
sudo unrar e -p XXXX.rar
4、切换桌面管理器
sudo dpkg-reconfigure gdm3
或
sudo dpkg-reconfigure lightdm
或
sudo dpkg-reconfigure sddm
5、ubuntu升级/降级内核
ubuntu内核网址
首先,查看自己的grub版本:
grub-install --version
查看自己现有的内核版本(完全版)
grep 'menuentry' /boot/grub/grub.cfg
复制上面信息中menuentry之后的单引号内的字符串
修改grub,在终端中输入
sudo nano /etc/default/grub
将第一个GRUB_DEFAULT=0的0修改为”Ubuntu,Linux ..-*-generic”(注意要加双引号,星号替换为内核版本号)
更新grub设置,在终端中输入
sudo update-grub
如果看到下面有
警告: Please don’t use old title Ubuntu,Linux ..-**-generic’ for GRUB_DEFAULT,use Advanced options for Ubuntu>Ubuntu,Linux ..–generic’(for versions before 2.00) or
`gnulinux-advanced-237310b8-5d8a-4e13-bcbd-37ef97be8341>gnulinux-..--generic-*
advanced-237310b8-5d8a-4e13-bcbd-37ef97be8341’ (for 2.00 or later)
则根据之前看到的grub版本,如果大于等于2.00,则返回第四步把第三个单引号内的字符串复制粘贴。否则把第二个单引号内的字符串复制粘贴,也就是说一定要重新修改一次grub。
修改完成后,再次在终端中输入
sudo update-grub
此时不应再看到任何警告提示,重新启动
sudo reboot
注意,我内核替换之后系统炸了,进不去,而且切换其他tty命令行执行无反应,我的办法是用ubuntu启动盘进入试用系统,然后修改系统硬盘/etc/default/grub和/boot/grub/grub.cfg,主要是在/boot/grub/grub.cfg文件中把默认内核替换成之前系统正常可以使用的内核,然后重启就可以了。至于为啥其他tty命令行执行无反应,我也不知道。
6、安装nvidia驱动
(https://wiki.debian.org/NvidiaGraphicsDrivers#Version_340.108_.28legacy_GPUs.29)
查看驱动程序包名称
sudo apt install nvidia-detect
卸载安装失败的驱动
sudo apt purge nvidia
Version 340.108 (legacy GPUs)
For support of GeForce 8 series through GeForce 300 series GPUs. (supported devices).
Add “contrib” and “non-free” components to /etc/apt/sources.list, for example:
Debian 10 “Buster”
deb http://deb.debian.org/debian/ buster main contrib non-free
Update the list of available packages, then we can install the nvidia-legacy-340xx-driver package:
1 | sudoapt update |
DKMS will build the nvidia module for your system, via the nvidia-legacy-340xx-kernel-dkms package.
After, create an Xorg server configuration file and then restart your system to enable the nouveau blacklist.
配置xorg.conf文件,使用xfce桌面环境时,未配置该项会在锁屏时出现黑屏无法唤醒
sudo nano /etc/X11/xorg.conf
1 | Section "Module" |
重启完成安装