Fedora is a leading-edge Linux distribution. Unlike Debian or Ubuntu, its repositories contain fairly recent versions of most software.
Update software
To update the operating system and installed software, run the following command:
sudo dnf upgrade --refresh
Always reboot your computer after installing updates, as not all programs can
be relaunched automatically.
If programs are not relaunched, they will remain on their current versions
and will not benefit from updated libraries.
Update firmware
Firmware updates are distributed via the Linux Vendor Firmware Service (LVFS). To check for updates, run:
sudo fwupdmgr refresh
To install any available updates:
sudo fwupdmgr update
You will be prompted to reboot to finish the installation process.
Firmware updates are issued by hardware vendors to fix bugs and correct security
flaws.
You should regularly check for firmware updates in addition to regular software
updates.
Install language packs
Sometimes, not all of the required dictionaries are installed, especially if your language is set to a non-US variant of English. As I am British, I would like my software to check for spelling errors using British English dictionaries, which can be installed using the following command:
sudo dnf install langpacks-en_GB
To find the correct package for your language, click
here.
Install a CLI text editor
This is important for the next step.Fedora comes with nano and Vim preinstalled, both of which are horrible editors. Thankfully, you can install a sane editor like micro from the Fedora repositories using one of these commands:
# for X11 (XFCE etc.)
sudo dnf install micro xclip xsel
# for Wayland (GNOME, KDE etc.)
sudo dnf install micro wl-clipboard
xclip/xsel and wl-clipboard allow micro to integrate with the system clipboard.
Disable SELinux
SELinux (Security-Enhanced Linux) is a complex security module for the Linux kernel. It is installed and enabled out-of-the-box on Fedora and other distributions in the Red Hat family. Its job is to restrict the behaviour and system access of various programs using security profiles, which are shipped alongside software packages.While this is a nice idea, in practice security profiles are often incorrect or become outdated over time, leading to AVC denial alerts and program crashes. On Fedora especially, it is best to just disable SELinux and avoid installing programs of questionable origin. If you are running Fedora or another RHEL-style distribution on a production server, you can isolate network-facing processes using Bubblewrap, which is much easier to use than SELinux.
To disable SELinux, open /etc/selinux/config as root and change the SELinux entry from enforcing to disabled.
sudo micro /etc/selinux/config
Then reboot your computer.
Set up RPM Fusion
Fedora's repositories contain only open source software. However, some important software is distributed only under proprietary or restricted licenses. Without these programs and libraries, you may experience multimedia playback failure or degraded performance.RPM Fusion is a well-known third party project that provides such software. You can enable the repositories using the commands below.
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
sudo dnf install rpmfusion-free-release-tainted
sudo dnf install rpmfusion-nonfree-release-tainted
NVIDIA users: driver installation
Warning: NVIDIA graphics cards are not as well-supported as AMD or Intel cards on Linux. Consider disabling Secure Boot before proceeding in order to avoid having to self-sign kernel modules.You will need to install the proprietary driver corresponding to your model. If you don't know which model you have, you can use the following command:
/sbin/lspci | grep -e VGA
If you are on a laptop with hybrid ("Optimus") graphics, try this command
instead:
/sbin/lspci | grep -e 3D
Next, install any available updates using dnf and then reboot if your
system was not up-to-date.
If your GPU was made in 2014 or later, install the driver using this command:
sudo dnf install akmod-nvidia
After the installation has completed, wait until this command...
modinfo -F version nvidia
...displays an output similar to this...
440.64
...and NOT this!
modinfo: ERROR: Module nvidia not found.
Then reboot your computer.
These instructions apply to (current) GeForce, Quadro and Tesla models. This excludes Legacy GeForce 600/700 (and older) series cards.
While it is possible to install the proprietary NVIDIA driver on older cards, you may face problems when using the new Wayland sessions. I highly recommend swapping out your card with a newer AMD or Intel Arc model for a more seamless experience. These manufacturers have released their drivers under open source licenses, which allows Fedora to include them by default, out-of-the-box.
Multimedia setup
The following commands will install many common codecs, required for playback of certain types of media files. This includes support for hardware-accelerated encoding and decoding.
sudo dnf swap ffmpeg-free ffmpeg --allowerasing
sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1
sudo dnf install @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin
For Intel (Gen 6+/Skylake+) users:
sudo dnf install intel-media-driver
For older Intel:
sudo dnf install libva-intel-driver
For AMD users:
sudo dnf install mesa-va-drivers-freeworld.{i686,x86_64}
sudo dnf swap mesa-vulkan-drivers{,-freeworld}.{i686,x86_64}
For NVIDIA users:
sudo dnf install libva-nvidia-driver.{i686,x86_64}
Install additional drivers
Some firmware packages are distributed only under proprietary or restricted licenses. To install them, run the following command:
sudo dnf --repo=rpmfusion-nonfree-tainted install "*-firmware"
Disable unnecessary services
The default firewall profiles shipped in Fedora permit a degree of exposure which may be unnecessary.
sudo firewall-cmd --remove-service={ssh,samba-client} --permanent
sudo firewall-cmd --remove-port=1025-65535/{tcp,udp} --permanent
sudo firewall-cmd --reload
The OpenSSH server and cups-browsed services should also
be disabled if they are not needed:
sudo systemctl mask --now sshd cups-browsed
Install TLP (laptops only)
TLP is a tool which can improve your battery life by tweaking certain kernel parameters.
sudo dnf remove tuned tuned-ppd
sudo systemctl mask --now systemd-rfkill.socket systemd-rfkill
sudo dnf install tlp tlp-rdw tlp-pd
sudo systemctl enable --now tlp tlp-pd
Remove dnfdragora from startup applications
Some variants of Fedora ship with a horrible, buggy program called dnfdragora. To stop dnfdragora from starting automatically:
mkdir -p ~/.config/autostart
micro ~/.config/autostart/org.mageia.dnfdragora-updater.desktop
Then paste the following:
[Desktop Entry]
Hidden=true