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

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

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

相关推荐
字节逆旅2 天前
ubuntu应用深度守护
ubuntu
欧云服务器8 天前
怎么让脚本命令可以同时在centos、debian、ubuntu执行?
ubuntu·centos·debian
智渊AI8 天前
Ubuntu 20.04/22.04 下通过 NVM 安装 Node.js 22(LTS 稳定版)
ubuntu·node.js·vim
The️8 天前
Linux驱动开发之Read_Write函数
linux·运维·服务器·驱动开发·ubuntu·交互
再战300年8 天前
Samba在ubuntu上安装部署
linux·运维·ubuntu
qwfys2008 天前
How to install golang 1.26.0 to Ubuntu 24.04
ubuntu·golang·install
木尧大兄弟8 天前
Ubuntu 系统安装 OpenClaw 并接入飞书记录
linux·ubuntu·飞书·openclaw
小虾爬滑丫爬9 天前
ubuntu上设置Tomcat 开机启动
ubuntu·tomcat·开机启动
老师用之于民9 天前
【DAY25】线程与进程通信:共享内存、同步机制及实现方案
linux·c语言·ubuntu·visual studio code
小虾爬滑丫爬9 天前
Ubuntu 上设置防火墙
ubuntu·防火墙