3. Ubuntu 14.04更换阿里云源,设置系统字体

步骤 1:查看系统版本代号

打开终端(快捷键 Ctrl+Alt+T),执行命令:

复制代码
lsb_release -a | grep Codename | awk '{print $2}'

从终端输出能看到,你的系统代号是 trusty ,对应 Ubuntu 14.04 版本。要把软件源换成阿里云,步骤如下:

1. 备份原有软件源(防止出错)

打开终端,执行命令:

bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2. 替换为阿里云源

用编辑器打开软件源配置文件(以 gedit 为例):

bash 复制代码
sudo gedit /etc/apt/sources.list

删除文件中原有内容,粘贴以下Ubuntu 14.04(trusty)的阿里云源:

bash 复制代码
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

粘贴后,按 Ctrl+O(保存)→ 回车 → Ctrl+X(退出)。

或者

bash 复制代码
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

两段配置的核心差异是是否包含「提议更新源(trusty-proposed)」:

  • 第一段配置:包含 trusty-proposed 相关的源(共2行,deb 和 deb-src 各一行)。trusty-proposed 是"提议更新源",里面的软件包处于测试阶段,稳定性比正式更新稍低,适合想尝鲜或测试新功能的场景。
  • 第二段配置:不包含 trusty-proposed 相关的源。只保留了基础源(trusty)、安全更新(trusty-security)、普通更新(trusty-updates)、回溯更新(trusty-backports),稳定性更高,适合追求系统稳定的普通用户。

简单说:第一段多了"测试阶段的更新源",第二段更精简、稳定。

3. 刷新软件源

执行命令让新源生效:

bash 复制代码
sudo apt update

这样系统就会从阿里云的镜像源获取软件更新,国内访问速度会更快~

  • 在 Ubuntu 14.04 中,若当前 "Appearance" 界面未直接显示字体设置,可通过以下方式解决:

方式 :用「GNOME 调整工具」(更灵活)

若滚动后仍找不到,可通过专门的工具 gnome-tweak-tool 精细调整字体:

  1. 安装工具 :打开终端(快捷键 Ctrl+Alt+T),执行命令:

    bash 复制代码
    sudo apt-get update
    sudo apt-get install gnome-tweak-tool
  2. 启动工具 :终端中输入 gnome-tweak-tool 并回车,或通过 Dash 搜索 "Tweak Tool" 打开。

  3. 调整字体 :在工具界面中,切换到 "Fonts" 选项卡,即可设置「界面字体」「文档字体」「等宽字体」的大小,还能自定义字体样式。

相关推荐
Apipi*37 分钟前
30天速通Linux 第六章信号及信号处理
linux·运维·信号处理
天启HTTP2 小时前
爬虫防封核心原理:IP轮换机制与风控规避逻辑
linux·服务器·网络·爬虫·tcp/ip
广州浮点FLOATLIC4 小时前
许可证服务器迁移后软件打不开:研发 IT 怎样定位连接问题
linux·服务器·数据库
BLUcoding4 小时前
接口服务公网超时排查记录:SecureRandom 阻塞问题分析与解决
java·linux·springboot·aes·securerandom
AIgorithmGEEK4 小时前
[Linux]从手写报头到内核套路:序列化、反序列化与自定义协议全链路
linux·运维·服务器·网络·序列化·反序列化
Nil2084 小时前
leetcode 139单词拆分
linux·运维·服务器
Starry-sky(jing)5 小时前
BUG: unable to handle kernel paging request 完整排查:dmesg 四要素与三路定罪
linux·运维·服务器·内核·排障
mounter6255 小时前
从硬件互连到操作系统变革:CXL 技术演进与 Linux 内核工程挑战
linux·运维·服务器
xh didida6 小时前
Linux -- 基础IO
linux·服务器·开发语言·c++
zly35007 小时前
centos7 mount设备挂载 /dev/sda1/硬盘挂载
linux·运维·服务器