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 14.04/16.04/18.04/20.04/22.04/24.04/26.04全系列LTS长期支持版镜像IOS分享
linux·运维·ubuntu
我先去打把游戏先3 小时前
【保姆级图文教程】:VMware虚拟机安装Ubuntu Server 22.04
linux·数据库·ubuntu
派葛穆4 小时前
Ubuntu-软件安装和执行
linux·运维·ubuntu
AlickLbc4 小时前
WSL2安装Ubuntu与Claude Code记录
linux·运维·ubuntu
Rust研习社8 小时前
Ubuntu 全面拥抱 Rust 后,我意识到 Rust 社区要变了
linux·服务器·开发语言·后端·ubuntu·rust
weixin_417257069 小时前
ubuntu系统-dify-相关文件配置
linux·运维·ubuntu
shanql10 小时前
系统安装:安装Ubuntu 26.04 LTS
linux·ubuntu
kobe_OKOK_12 小时前
ubuntu server设置 NTP 服务器
linux·服务器·ubuntu
肖坤超12 小时前
Ubuntu 26.04 完美安装和设置
linux·运维·ubuntu
Irene199113 小时前
两种 Linux 发行版:Ubuntu 与 CentOS Shell 环境核心差异对比(查看 Linux 版本,Hadoop 是什么)
linux·ubuntu·centos