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

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

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

相关推荐
十日十行11 小时前
修复root用户登录的浏览器无法跳转vscode问题
ubuntu
The️17 小时前
Linux驱动开发之Makefile
linux·驱动开发·mcu·ubuntu
yunianshu18 小时前
Ubuntu 24.04 双系统安装(不使用 U 盘,亲测有效)
linux·运维·ubuntu
ZaneAI18 小时前
🚀 古董笔记本变废为宝:安装 OpenClaw + MiniMax,打造 24 小时在线 AI 助理
ubuntu·agent
xin_yao_xin2 天前
查询端口占用小脚本(ubuntu)
linux·运维·ubuntu
wangjialelele2 天前
Linux信号处理、中断、与页表映射
linux·运维·ubuntu·centos·信号处理·gnu
非自律懒癌患者2 天前
Ubuntu 浏览器建立安全连接失败
linux·运维·ubuntu
HIT_Weston2 天前
129、【Ubuntu】【Hugo】首页板块配置(一)
linux·运维·ubuntu
YYYing.2 天前
【Linux/C++文件篇(一) 】标准I/O与文件I/O基础 :一文掌握文件操作的核心
linux·运维·c语言·c++·ubuntu·centos