记录:ubuntu20.04的安装和必要的开发准备

记录ubuntu20.04的安装和必要的开发准备

    • 准备
    • [1. 安装ubuntu20.04时的Tips](#1. 安装ubuntu20.04时的Tips)
    • [2. 屏幕亮度调节问题](#2. 屏幕亮度调节问题)
    • [3. 解决 "No Wi-Fi Adapter Found"](#3. 解决 "No Wi-Fi Adapter Found")
    • [4. Nvidia Driver && cuda](#4. Nvidia Driver && cuda)
    • [5. 修改安装源](#5. 修改安装源)
    • [6. ssh 远程开发](#6. ssh 远程开发)

准备

没有装双系统,只有 ubuntu20.04,记录安装之后遇到的一些问题和解决方案。

名称 版本
Legion 7 Pro

1. 安装ubuntu20.04时的Tips

  • BIOS 设置 discrete graphic (没这个后续不好安装nvidia driver)
  • 安装时 勾选 Install third-party-software

2. 屏幕亮度调节问题

  • 从 设置-》电源-》屏幕亮度(s)在这里就可以调整了。
  • 连接一个外置显示器吧,放过自己。

参考:https://blog.csdn.net/weixin_44120025/article/details/118875998

3. 解决 "No Wi-Fi Adapter Found"

前提:电脑Ethernet可以用,电脑有wifi相关硬件。

  1. 检查
bash 复制代码
lshw -c network

显示 -network UNCLAIMED 证实缺少驱动。

  1. 查看网卡型号
bash 复制代码
lspci -nn | grep -i net

输出中有:intel corporation device [8086:7a70] 通过网址查询网卡型号为 WiFi 6E AX211(不同网卡型号解决方案不同)。3. 下载:https://launchpad.net/ubuntu/+archive/primary/+files/backport-iwlwifi-dkms_9858-0ubuntu3_all.deb

  1. 安装
bash 复制代码
sudo dpkg -i  backport-iwlwifi-dkms_9858-0ubuntu3_all.deb

5.重启 就可以了

参考https://gitcode.csdn.net/65e7d4aa1a836825ed789b19.html?dp_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6NDgwODEzLCJleHAiOjE3Mjc0Mjg4NzMsImlhdCI6MTcyNjgyNDA3MywidXNlcm5hbWUiOiJ3ZWl4aW5fNDU2NTQxNTIifQ.1Qvs0coY-GJI1e2GugX9iH3CwLj8uBmlY3PcDpAK5hg&spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-1-133170908-blog-123948345.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-1-133170908-blog-123948345.235%5Ev43%5Epc_blog_bottom_relevance_base7&utm_relevant_index=1

4. Nvidia Driver && cuda

  • setting -> about -> software updates ->additional drivers
    选择一个driver -> Apply Changes -> 重启之后nvidia-smi可用 (ubuntu20.04 默认就是 version: 535)。
  • 因为是实体机,后续正常安装cuda就可以。

5. 修改安装源

会遇到sudo apt update失效的问题,例如,W: Failed to fetch http://hk.archive.ubuntu.com/ubuntu/dists/xenial/InRelease

bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old #(optional)备份一下默认版本
sudo vim /etc/apt/sources.list 
  • 手动把 http://hk.archive.ubuntu.com/ubuntu/ focal
    改成 http://archive.ubuntu.com/ubuntu/ focal
  • 如果在大陆改成清华源等

参考:https://sam66.medium.com/ubuntu-apt-update時顯示無法連接-21e86e1a378a

6. ssh 远程开发

  • ubuntu20.04端
bash 复制代码
sudo apt update
sudo apt-get install openssh-server
sudo systemctl status ssh # 查看状态
  • win11 + vscode端(安装拓展:Remote-SSH, Remote Development )
bash 复制代码
ssh 用户名@192.168.xxx.xxx
相关推荐
Jtti5 小时前
如何在Ubuntu上查看和刷新DNS缓存
linux·ubuntu·缓存
Shine.Zhang5 小时前
ubuntu server设置wifi和静态IP
tcp/ip·ubuntu
浪游东戴河5 小时前
WebRTC源码下载及编译(Ubuntu20.04)
ubuntu·webrtc·编译·代理·下载
FHKHH17 小时前
ubuntu使用Vscode进行实现UDP编程
vscode·ubuntu·udp
寻爱的希斯克利夫19 小时前
jenkins 部署到tomcat
ubuntu·servlet·tomcat·jenkins
FHKHH21 小时前
计算机网络第二章:作业 2: UDP ping 程序
运维·服务器·vscode·计算机网络·ubuntu·udp
new_abc1 天前
ALSA ubuntu 编译
linux·ubuntu
-Harvey1 天前
ubuntu 自带截图快捷键
ubuntu·截屏·截图
玖石书1 天前
ubuntu 20.04修改启动项默认等待时间
linux·运维·ubuntu