当前位置: 首页 > article >正文

ubuntu22.04新机使用(换源,下载软件,安装显卡驱动,锁屏长亮)

换源

国内有很多Ubuntu的镜像源,包括阿里的、网易的,还有很多教育网的源,比如:清华源、中科大源。推荐使用中科大源,快得很。

/etc/apt/sources.list

编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):
中科大源

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

然后执行命令:

sudo apt-get update
sudo apt-get upgrade

其他几份国内源如下,可按需添加:
清华源:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

阿里源:

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

网易163源:

deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

星火商店

使用linux不方便的一点是软件的下载,需要软件的linux版本,可以去软件的官网找到linux版本下载,推荐直接使用星火商店下载,十分方便。星火商店官网:https://spark-app.store/
在这里插入图片描述

选择软件本体下载,换源后可以安装软件本体可以自动安装依赖:

在这里插入图片描述
点击开始下载,选择第一个下载:
在这里插入图片描述
使用apt下载:

sudo apt install ./xxxx.deb

安装成功后可选择自己需要的应用下载,十分方便:
在这里插入图片描述

安装显卡驱动

1.官网下载驱动

根据自己显卡选择驱动,官网地址:https://www.nvidia.cn/Download/index.aspx?lang=cn#
在这里插入图片描述下载后放到英文路径下,中文容易乱码。

2.关闭secure boot

查看secure boot

mokutil --sb-state

在这里插入图片描述如果是enabled,开机时进入bios将secure boot调整为disabled。

3.更新软件列表和安装必要软件、依赖

sudo apt-get update
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make

4.禁用默认驱动

在安装NVIDIA驱动以前需要禁止系统自带显卡驱动nouveau。

sudo gedit /etc/modprobe.d/blacklist.conf

在打开文件的末尾添加:

blacklist nouveau
options nouveau modeset=0

最后更新一下系统的initramfs镜像文件:

sudo update-initramfs -u

重启,lsmod没有输出的话就说明禁用了nouveau。

lsmod | grep nouveau

5.进入tty模式

sudo telinit 3

输入用户名和密码登录。

禁用X-window服务:

sudo service gdm3 stop

6.给下载的驱动文件权限,安装驱动

sudo chmod 777 NVIDIA-Linux-x86_64-535.129.03.run 
sudo ./NVIDIA-Linux-x86_64-535.129.03.run –no-opengl-files -no-x-check

7.安装选项:

这两个问题选No,其他的选accept,continue install,yes等正面词汇。

  • Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? No
  • Nvidia’s 32-bit compatibility libraries? No

8.启动图形界面

sudo service gdm3 start

9.查看驱动

nvidia-smi

在这里插入图片描述屏幕的分辨率可以调整了:

在这里插入图片描述

锁屏长亮

长按window键 + L 即可常亮锁屏。短按就是取消常亮锁屏


http://www.kler.cn/news/149513.html

相关文章:

  • 5、基础入门——资产架构端口应用WAF站库分离负载均衡
  • 逻辑漏洞 暴力破解(DVWA靶场)与验证码安全 (pikachu靶场) 全网最详解包含代码审计
  • MySQL InnoDB Cluster
  • python学习过程中一些问题记录总结
  • 智能客服核心技术——预测会话与答案生成
  • JSON详细教程
  • 面试题:汉诺塔问题 · 递归
  • 知识工作者,需要填报工时么? | IDCF
  • 基于springboot的电影院管理系统的设计与实现 (含论文和源码视频导入教程)
  • HarmonyOS 传感器开发指南
  • 专业的事交给专业的公司来做,文件销毁 数据销毁 硬盘销毁
  • 添加通信作者标记、共同作者标记
  • 剑指 Offer(第2版)面试题 10:斐波那契数列
  • 深入理解 Cookie 和 Session 的工作流程
  • 【工业智能】Solutions
  • Android : 异常记录
  • 分布式机器学习、联邦学习、多智能体的区别和联系——一文进行详细解释
  • Mysql中正则表达式Regexp常见用法
  • 直线(蓝桥杯)
  • docker-compose Foxmic dt版
  • P9242 [蓝桥杯 2023 省 B] 接龙数列(dp+最长接龙序列+分类)
  • 什么是关系型数据库?
  • Windows快速找到软件的exe文件路径
  • Golang并发模型:Goroutine 与 Channel 初探
  • 冒泡排序以及改进方案
  • BGP综合实验(IP)
  • 【密码学引论】Hash密码
  • C语言每日一题(40)栈实现队列
  • MVVM 模式与 MVC 模式:构建高效应用的选择
  • 3种在ArcGIS Pro中制作山体阴影的方法