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行,debdeb-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" 选项卡,即可设置「界面字体」「文档字体」「等宽字体」的大小,还能自定义字体样式。

相关推荐
石像鬼₧魂石1 小时前
内网渗透靶场实操清单(基于 Vulhub+Metasploitable 2)
linux·windows·学习·ubuntu
橘子真甜~3 小时前
C/C++ Linux网络编程15 - 网络层IP协议
linux·网络·c++·网络协议·tcp/ip·计算机网络·网络层
拾贰_C4 小时前
【Linux | Windows | Terminal Command】 Linux---grep | Windows--- findstr
linux·运维·服务器
阿华hhh4 小时前
Linux系统编程(标准io)
linux·开发语言·c++
石像鬼₧魂石5 小时前
Kali Linux 网络端口深度扫描
linux·运维·网络
alengan5 小时前
linux上面写python3日志服务器
linux·运维·服务器
Rose sait6 小时前
【环境配置】Linux配置虚拟环境pytorch
linux·人工智能·python
叶之香7 小时前
CentOS/RHEL 7、8安装exfat和ntfs文件系统
linux·运维·centos
一世琉璃白_Y7 小时前
pg配置国内数据源安装
linux·python·postgresql·centos