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

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

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

相关推荐
威迪斯特5 小时前
Ubuntu的apt命令详解:系统管理的核心工具
运维·服务器·ubuntu·apt·下载·包管理·维护
freewlt8 小时前
TypeScript 5.5 新特性深度解析:类型系统的又一次进化
linux·ubuntu·typescript
Sapphire~9 小时前
Linux-15 ubuntu 和 windows 双系统,更新系统导致丢失ubuntu 入口
linux·运维·ubuntu
温柔一只鬼.9 小时前
Ubuntu 安装 Python 3.10 完整指南
linux·运维·ubuntu
daemon.qiang9 小时前
Ubuntu 20.04+安装JFrog CLI超详细指南
linux·运维·ubuntu
湖城彭于晏9 小时前
VMware Ubuntu 固定IP + 上网 + 远程访问 完整教程
linux·ubuntu·vmware
剪刀石头布Cheers9 小时前
Ubuntu Hermes安装关键步骤
linux·运维·ubuntu·ai·agent·hermes
Lupino1 天前
别让服务器“吃里扒外”:从流量耗尽封禁,到一行命令瞬间反杀
ubuntu
w_t_y_y1 天前
Claude Code(二)rules
linux·运维·ubuntu
我想成为你噶叻叻猪1 天前
imx6ull板子ping不通ubuntu
linux·运维·ubuntu