1.卸载无用的包

1.卸载无用的包

我使用 Fedora 工作站 33 作为我的主系统(编码、浏览、办公......),在一台 8GB、i3、慢速硬盘笔记本电脑上。有哪些技巧可以让它更快?

答案1

1.卸载无用的包

这会删除服务并释放空间

#watch the deps!
dnf rm abrt avahi audit adobe-mappings-cmap ModemManager 
dnf rm containernetworking-plugins cups cups-client empathy evolution evince fedora-workstation-backgrounds f31-backgrounds-base flatpak foomatic-db-ppds fpaste
dnf rm geolite2-city gnome-classic-session gnome-contacts gnome-getting-started-docs  gnome-user-docs gnome-tour gssproxy gutenprint gvfs-gphoto2 gucharmap iok 'hplip*' 'kde*' libpurple libreoffice-emailmerge libreoffice-math
dnf rm libreport
dnf rm m17n-contrib mcelog  'qemu*' qt-x11 orca 
dnf rm open-vm-tools pcsc-lite pcsc-lite-libs php-common redis rhythmbox rng-tools samba-client sane-backends sane-backends-libs shotwell 'selinux-policy*' sssd 'libsss_*' totem tracker-miners
dnf rm virtualbox-guest-additions vim-filesystem vim-minimal yum
# i18n
dnf rm libpinyin libkkc libkkc-data libhangul opencc   thai-scalable-fonts-common   nhn-nanum-gothic-fonts wqy-zenhei-fonts smc-fonts-common    smc-meera-fonts skkdic cjkuni-uming-fonts
dnf rm PackageKit

2.禁用无用的服务

DISABLE_SERVICES="atd dnf-makecache firewalld mdmonitor NetworkManager-wait-online redis unbound-anchor.timer"; for i in $DISABLE_SERVICES; do systemctl stop $i;  systemctl disable $i; done

3. 分析剩下的内容

# see active services
systemctl -t service --state=active

# see what's taking boot time
systemd-analyze blame

# see largest packages
rpm -qa --queryformat '%{name}-%{version}-%{release} %{size}\n' | sort -nr -k2 | head -n 100 | less

# list top 10 largest open files
lsof / | awk '{ if($7 > 1048576) print $7/1048576 "MB "$9 }' | sort -n -u | tail

4.禁用selinux

nano /etc/selinux/config
SELINUX=disabled

相关内容