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

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

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

相关推荐
Byron Loong3 小时前
【Git】如何检查 Ubuntu 系统上 gitLab 是否开启
git·ubuntu·gitlab
一叶龙洲15 小时前
win11与Ubuntu之间同步配置、插件
linux·运维·ubuntu
小秋求学记.1 天前
Linux_Ubuntu的相关问题
linux·运维·ubuntu
ly-272531 天前
Ubuntu重启之后挂载盘符变更应该怎么修复
linux·ubuntu
一叶龙洲2 天前
wsl中安装了图形ubuntu24.04,在语言中安装了中文,但是系统里还是英文
ubuntu
郝亚军3 天前
ubuntu如何设置超级用户root
linux·运维·ubuntu
IDIOT___IDIOT4 天前
一次重装 Ubuntu 系统经验操作记录
linux·ubuntu·docker·nvidia
yangshun_cug4 天前
Windows 11 的 WSL2 Ubuntu 22.04 安装 Seismic Unix 44R28 完整教程
windows·ubuntu·seismic unix
国服第二切图仔4 天前
05-构建与特性开关
linux·服务器·ubuntu
FREEDOM_X4 天前
嵌入式——定时器工作原理
linux·c语言·单片机·嵌入式硬件·ubuntu