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、设置客户机隔离

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

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

相关推荐
sghuter1 天前
Ubuntu安装Redis
redis·ubuntu·bootstrap
HwJack201 天前
HarmonyOS响应式布局与窗口监听:让界面像呼吸般灵动的艺术
ubuntu·华为·harmonyos
gordon~91 天前
Windows 11 wsl 中安装的Ubuntu-24.04 中装docker
windows·ubuntu·docker
XXOOXRT1 天前
Ubuntu搭建Java项目运行环境(JDK17+MySQL8.0)超详细教程
java·linux·mysql·ubuntu
吴声子夜歌1 天前
TypeScript——类型基础(二)
linux·ubuntu·typescript
vvw&1 天前
如何从 Ubuntu 24.04 升级到 Ubuntu 25.04
linux·运维·服务器·ubuntu
tobebetter95271 天前
Debian / Ubuntu openclaw 浏览器自动化
ubuntu·自动化·debian
王小义笔记1 天前
解决使用WSL客户端养龙虾后C盘空间告急的问题
ubuntu·ai·键盘·openclaw
STKingA12 天前
Win11 WSL2+Ubuntu开发环境配置全攻略
linux·运维·ubuntu
吴声子夜歌2 天前
TypeScript——内置工具类型、类型查询、类型断言和类型细化
linux·ubuntu·typescript