在Ubuntu上更新FetchLinux的方法如下:
通过包管理器更新(推荐):
sudo apt update
sudo apt install --only-upgrade fetchlinux
(若已通过apt install fetchlinux安装过,此命令会直接升级到最新版本)
手动更新(从源码):
sudo cp /opt/fetchlinux/fetchlinux.conf /opt/fetchlinux/fetchlinux.conf.bak
cd /opt/fetchlinux
sudo git pull origin main
sudo cp fetchlinux.conf.example fetchlinux.conf
sudo nano fetchlinux.conf # 按需修改配置
sudo chown -R fetchlinux:fetchlinux /opt/fetchlinux
sudo systemctl restart fetchlinux
验证更新:
fetchlinux --version
确认输出为最新版本号。
注意:若使用过自定义配置,更新前建议备份配置文件(如fetchlinux.conf)。