Ubuntu24.04换源和解决物理机无法复制粘贴到虚拟机问题

一、换源

Ubuntu 24.04不再使用传统的 /etc/apt/sources.list 文件,而是采用新的 .sources 格式文件,默认路径为/etc/apt/sources.list.d/ubuntu.sources

1、先备份一下原来的文件

bash 复制代码
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak

2、修改配置文件

bash 复制代码
sudo vim /etc/apt/sources.list.d/ubuntu.sources

3、替换源(可以用清华源等)

bash 复制代码
Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

如图:

4、保存之后更新一下包

bash 复制代码
sudo apt update
sudo apt upgrade -y

5、源地址

5.1中科大

bash 复制代码
Types: deb
URIs: http://mirrors.ustc.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

5.2阿里云

bash 复制代码
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

二、解决物理机无法复制粘贴到虚拟机

1、安装vm-tools

bash 复制代码
sudo apt update
sudo apt install -y open-vm-tools-desktop

2、设置客户机隔离

打开虚拟机设置--》选项--》客户机隔离,允许复制粘贴

保存之后重启虚拟机就行了

相关推荐
北山有鸟6 小时前
用开发板的.config替换ubuntu中内核源码目录的.config
linux·运维·ubuntu
wait a minutes10 小时前
Ubuntu 升级后 NVIDIA 驱动修复指南
linux·运维·ubuntu
量子物理学14 小时前
ubuntu安装docker
ubuntu·docker·eureka
MIXLLRED15 小时前
随笔——在 Ubuntu 22.04 中查看 Markdown (.md) 文件
linux·运维·ubuntu·markdown
面向对象World17 小时前
Z8350 Broadcom SDIO网卡调试Ubuntu 22.04 Server版
linux·运维·ubuntu
wait a minutes19 小时前
【Ubuntu】Ubuntu 20.04 升级到 24.04 完整指南
ubuntu
丑过三八线20 小时前
Umi 配置文件 .umirc.ts 详解
linux·运维·ubuntu·react.js
喵喵爱自由21 小时前
ubuntu离线扩展磁盘分区
linux·运维·ubuntu
风吹夏回2 天前
TypeScript 快速上手指南:从 JavaScript 到类型安全
javascript·ubuntu·typescript
jingling5552 天前
从零到一:用 Aholo Viewer 在浏览器里渲染 3D 高斯泼溅小熊
linux·前端·ubuntu·3d