Skip to content
Fodor 配置指南

解决 c.UTF-8 en_US.UTF-8 zh_CN.UTF-8 locale 报错

sh
sudo dnf install glibc-langpack-en glibc-langpack-zh

设置中文Locale (可选)

sh
# 设置系统默认 locale 为 zh_CN.UTF-8
# ~/.bashrc
export LANG=zh_CN.UTF-8

启动并设置自启 ssh-server

sh
# 查看状态
sudo systemctl status sshd

# 启动
sudo systemctl start sshd

# 设置自启
sudo systemctl enable sshd

建议直接通过另一台设备建立ssh连接来进行配置,这样可以复制页面命令

修改清华大学镜像源

https://mirrors.tuna.tsinghua.edu.cn/help/fedora

sh
sudo sed -e 's|^metalink=|#metalink=|g' \
    -e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora|g' \
    -i.bak \
    /etc/yum.repos.d/fedora.repo \
    /etc/yum.repos.d/fedora-updates.repo
sh
sudo dnf clean all
sudo dnf makecache

启用 rpm fusion

https://rpmfusion.org

sh
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sh
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1

安装 flatpak

https://flathub.org/zh-Hans

sh
# 安装 flatpak
sudo dnf install flatpak -y

# 初始化 flathub 仓库(创建缺失的目录)
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

# 设置 flatpak 镜像源
# https://mirrors.ustc.edu.cn/flathub 中国科学技术大学
# https://mirror.sjtu.edu.cn/flathub	上海交通大学
flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub

# 验证镜像源
flatpak remote-info flathub

安装微信和 QQ

sh
flatpak install com.tencent.WeChat
flatpak install com.qq.QQ

添加 terra 软件仓库 (国内无法访问)

https://terra.fyralabs.com

sh
sudo dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release

添加后搜索报错,可以使用一下命令禁用 terra 仓库

sh
sudo dnf config-manager setopt terra.enabled=0

启用 fedora copr

https://copr.fedorainfracloud.org

sh
# dnf copr enable <user>/<project>
# 例如安装 dhalucario/ly
# sudo dnf copr enable dhalucario/ly

安装 Chrome

sh
sudo dnf install -y wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo dnf install ./google-chrome-stable_current_x86_64.rpm -y

开启后检查依赖更新

sh
sudo dnf clean all
sudo dnf check-update
sudo dnf update

查看当前开启的仓库列表

sh
dnf repolist

设置不保留重复命令历史

sh
# ~/.bashrc
export HISTCONTROL=ignoreboth:erasedups

# ~/.zshrc
setopt HIST_IGNORE_ALL_DUPS

安装 helix

sh
sudo dnf install helix

配置 helix

sh
git clone https://github.com/Himavanta/helix-config.git ~/.config/helix

设置 sway 自启

~/.bashrc 或者 ~/.zshrc

sh
# If running from tty1 start sway
[ "$(tty)" = "/dev/tty1" ] && exec sway

配置 sway

默认配置文件路径在 /etc/sway/* , 可以在 /etc/sway/config.d/ 下新建一个 custom.conf , 然后在其中追加自定义配置

所有的配置修改不会对已经打开的窗口生效,包括 foot 终端。配置保存后可以通过 swaymsg reload 或者 $mod+shift+c 来重新加载配置

default_border pixel 2
gaps inner 8
output * scale 1.5

# font <字体名称> <字号>
font pango:MapleMono NF CN 12

# 设置 wmenu 的配色和字体
# 需要注释 /etc/sway/config.d 中的 $menu
set $menu wmenu-run -l 10 -f "MapleMono NF CN 12" -N "#282828" -n "#fbf1c7" -M "#282828" -m "#458588" -S "#458588" -s "#fbf1c7"


# 格式: <边框> <背景> <文字> <指标线> <子边框>
client.focused          #458588 #458588 #fbf1c7 #458588 #458588
client.focused_inactive #3c3836 #3c3836 #fbf1c7 #3c3836 #3c3836
client.unfocused        #504945 #504945 #fbf1c7 #504945 #504945
client.urgent           #fb4934 #fb4934 #fbf1c7 #fb4934 #fb4934


bar {
    position top
    # 状态栏命令
    status_command while date +'%Y-%m-%d %H:%M:%S'; do sleep 1; done

    colors {
        background #282828
        separator  #665c54
        focused_workspace  #458588 #458588 #fbf1c7
        active_workspace   #83a598 #83a598 #fbf1c7
        inactive_workspace #282828 #282828 #928374
        urgent_workspace   #fb4934 #fb4934 #fbf1c7
    }
}

input * {
    natural_scroll enabled
}

input "type:touchpad" {
    natural_scroll enabled
    tap enabled
}

修改系统UI字体

修改GTK应用UI字体

sh
gsettings set org.gnome.desktop.interface font-name 'Noto Sans CJK SC Medium 10'

# 或者 /etc/sway/custom.conf
exec gsettings set org.gnome.desktop.interface font-name 'Noto Sans CJK SC Medium 10'

修改QT应用UI字体

sh
# ~/.config/fontconfig/conf.d/99-custom-fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Noto Sans CJK SC Medium</family>
    </prefer>
  </alias>
  <alias>
    <family>monospace</family>
    <prefer>
      <family>MapleMono NF CN</family>
    </prefer>
  </alias>
</fontconfig>

配置 foot

如果只是调整字体样式,可以直接修改配置文件,默认配置文件路径 /etc/xdg/foot/foot.ini

font=MapleMono NF CN:size=12
line-height=20

[colors]
alpha=0.95

字体修改

这里需要使用 curl 下载字体包,将字体文件移入字体目录,然后刷新字体缓存

sh
curl -LJO https://github.com/subframe7536/maple-font/releases/latest/download/MapleMono-Variable.zip
# 或
curl -LJO https://github.com/subframe7536/maple-font/releases/latest/download/MapleMono-NF-CN-unhinted.zip
sh
sudo dnf install -y unzip
mkdir maple
unzip ./MapleMono-NF-CN-unhinted.zip -d maple

sudo mkdir -p /usr/share/fonts/maple
sudo cp ./maple/*.ttf /usr/share/fonts/maple/
sudo fc-cache -fv

列出所有系统字体

sh
fc-list

安装 TUI 组件

登陆

ly: 这是一个轻量级的 TUI (ncurses-like) 显示管理器(即登录管理器)。它界面简洁美观,允许用户选择不同的桌面环境或窗口管理器进行登录,并且高度可定制。

lidm (Light Display Manager): 另一个轻量级的纯文本登录管理器,旨在完全在终端/TTY 中运行,不依赖 X.org 图形。它具有高度的可定制性,支持多种 init 系统(如 systemd、runit 等)。

网络

nmtui: 这是 NetworkManager 的官方 TUI 前端。它提供了一个直观的 curses 界面,可以方便地编辑、激活、停用网络连接,包括 Wi-Fi (支持密码输入)、有线连接、VPN 等。对于大多数使用 NetworkManager 作为后端服务的现代发行版来说,它是首选的 TUI 工具。

nmcli: 严格来说它是一个命令行界面 (CLI) 工具,但功能非常强大,常用于脚本编写或快速配置网络。虽然不是全屏 TUI 界面,但它与 nmtui 使用相同的后端,对于熟悉命令的用户来说非常高效。

iwctl: 如果你的系统使用 iwd (不同的无线后端守护程序) 而不是 NetworkManager,iwctl 是其主要的命令行/TUI 接口。

蓝牙

bluetuith: 这是一个现代的、基于 TUI 的蓝牙管理器,旨在替代传统的蓝牙管理器(如 blueman)。它提供了丰富的功能,包括连接/断开设备、配对、管理设备信息(如电量、信号强度)、文件传输(通过 OBEX)甚至媒体播放控制。它支持鼠标操作,界面友好。

bluetui: 另一个类似的 TUI 蓝牙管理工具,专注于简洁高效的设备配对、连接和电源管理。

资源监视器

btop: 性能更强大的监控工具,提供了美观的 ASCII 图形界面,可以实时显示 CPU 核心使用率、内存、磁盘 I/O、网络速度和进程列表,支持鼠标操作和高度自定义主题。

ls替代命令

lsd

shell
sudo dnf install lsd

# ~/.bashrc
alias ll="lsd -a --tree --group-directories-first --depth 2"

文件管理

nnn

音频输入输出

alsamixer: 这是 Linux 音频(ALSA)最经典、最基础的 TUI 混音器。它几乎可以在任何 Linux 系统上使用,不依赖 PulseAudio 或 PipeWire。

截图录屏

终端多路复用与会话管理

tmux: 这是一个极其重要的工具。它允许你在一个物理终端会话中创建、控制和管理多个虚拟终端(会话、窗口和窗格)。最重要的是,即使你断开 SSH 连接,会话也会保留在服务器上,非常适合远程工作和后台任务。 screen: tmux 的前辈,功能类似,也是一个经典的终端多路复用器。

设备管理器,比如打印机

处理鼠标自然滚动

gitui

https://github.com/gitui-org/gitui

Release time: 12/4/2025, 4:08:48

Last updated:

⟣ Growing, with you. ⟢