This is a guide on how I customize my Fedora installation. Fedora Workstation is a great operating system if you want something between a beginner-friendly Linux distribution (e.g., Linux Mint) and a highly customizable and experimental distro (e.g., Arch Linux).
Base Installation & Initial Boot Setup
NOTE
This guide is tested on Fedora Workstation 44 using the GNOME Desktop Environment.
After the following the whole guide, the system will consume about 25 GBs of storage space.
We need to increase the number of inotify instances because some applications
(e.g., Visual Studio Code/Neovim LSP Servers) require more than the default
value. We also enable kernel.sysrq to allow us to use the Magic SysRq key
for emergency situations. The second command applies the changes we made to
the system configuration.
Before proceeding, create desktop directories and clone the SetupGuides-dotfiles repository to ~/Temp.
Most software that will be installed are pre-configured in the dotfiles repository, so we will just copy
the configuration files to their respective locations.
Fedora Workstation comes with the new Ptyxis terminal, which is a modern terminal emulator for GNOME.
You can keep using it or use kitty, which is a cross-platform GPU-based terminal emulator.
However, the main shell that I use is Zsh with Oh My Zsh.
Follow the ZSH customization guide to set it up.
TIP
It is recommended that you restart your terminal for the changes to take effect.
Development
As a software engineer, I need to install development tools and programming languages.
However, some of the applications that are installed in this setup also require
these tools to be installed (e.g., Node.js, Rust, Go, etc.) to work properly.
So, I install these tools first before installing the applications.
# development toolssudo dnf install uv python3-pip gcc golang rustup# install lazygit to use as Git TUIsudo dnf copr enable dejan/lazygitsudo dnf install lazygit# install Fast Node Managercurl -fsSL https://fnm.vercel.app/install | bashcat ~/.bashrc | tail -n 6 >> ~/.config/zsh/user_env.sh
After changing the ZSH configuration, reload the config either by restarting your terminal or running exec zsh.
fnm install --latest --use # install and use latest version of Node# install Buncurl -fsSL https://bun.sh/install | bashcat ~/.bash_profile | tail -n 3 >> ~/.config/zsh/user_env.sh
We’ve changed the ZSH config again, so reload the config again.
Aside from Firefox, I also use a backup browser as a fallback, Microsoft Edge, which is available as an unofficial flatpak. As an alternative, you can also use Ungoogled Chromium.
# Install Microsoft Edgeflatpak install flathub com.microsoft.Edge# or use Ungoogled Chromiumflatpak install flathub io.github.ungoogled_software.ungoogled_chromium
And on the terminal, run the following commands to enable Discord Rich Presence in
Vesktop. This sets up a symlink at %t/discord-ipc-0 (your $XDG_RUNTIME_DIR, usually
/run/user/$UID) pointing to Vesktop’s socket, so that other applications
(e.g., Visual Studio Code, Neovim) can use it to show your Discord Rich Presence.
I am using this OS as my daily driver, so I need to install multimedia codecs
to play videos and music. I’m not actually sure which codecs are required for
Fedora Workstation, but I installed the following packages to make sure that
I can play all of my media files.
Of course, gaming is one of the main reasons why I use Fedora Workstation. I
use Steam as my main gaming platform, and I
also use Bottles to run Windows games and applications
that are not available on Linux.
Open Steam once to create the necessary files and directory, then install Proton-GE via ProtonUp-Qt.
Set Steam Settings > Compatibility > Run other titles with to GE-Proton.
TIP
When you are going to play a game, enable mangohud and gamemode by adding the following to the launch options:
mangohud gamemoderun %command%
Virtualization
If you want to run virtual machines, you need to install the virtualization group and enable libvirtd on boot.
You can instead use Oracle VirtualBox (I haven’t tested it yet though), but I prefer using virt-manager
because it is more integrated with Linux and has all the features that I need.
# more info: https://docs.fedoraproject.org/en-US/quick-docs/virtualization-getting-started/# install virtualization groupsudo dnf group install virtualization# enable libvirtd on bootsudo systemctl enable --now libvirtd# verify KVM kernel moduleslsmod | grep kvm
Nested Virtualization
You only have to enable nested virtualization if you want to run virtual machines inside a virtual machine. If you
are not going to do that, you can skip this step. More information can be found on Fedora Wiki.
Enabling nested virtualization in an Intel CPU
First, check if your CPU supports nested virtualization:
cat /sys/module/kvm_intel/parameters/nested
If you see 1 or Y, nested virtualization is supported; if you see 0 or N, nested virtualization is not supported. If it is supported, run the following command to permanently enable nested virtualization.
echo 'options kvm_intel nested=1' | sudo tee -a /etc/modprobe.d/kvm.conf
Enabling nested virtualization in an AMD CPU
First, check if your CPU supports nested virtualization:
cat /sys/module/kvm_amd/parameters/nested
If you see 1 or Y, nested virtualization is supported; if you see 0 or N, nested virtualization is not supported. If it is supported, run the following command to permanently enable nested virtualization.
echo 'options kvm_amd nested=1' | sudo tee -a /etc/modprobe.d/kvm.conf
Android Applications
I haven’t used this much, but I installed Waydroid to
run Android applications on my Fedora Workstation. It is a container-based
approach to boot a full Android system on a regular GNU/Linux system.
sudo dnf install waydroid
After installing, launch Waydroid from the applications menu and proceed with the initialization by pasting these URLs in the OTA fields:
I use several online cloud storage services, mainly Google Drive, OneDrive, and MEGA.
GNOME has support for Microsoft 365 accounts, but MEGA is not supported natively.
As of GNOME 50, Google Drive support has been dropped
due to its dependencies being unmaintained.
To solve all these, we will use rclone to mount these cloud storage services as virtual drives. This will
require some setup, but it is worth it in the end. To start, install rclone and run rclone config to
add remotes that you want to use. Refer to rclone’s documentation for more
information on how to configure remotes. For Google Drive remotes, you most likely want to use your
own Google API credentials instead of the default ones provided by rclone as the default credentials have
a very low API quota and will most likely hit the limit if you are going to use it frequently. You can
create your own credentials by following this guide.
sudo dnf install rclonerclone config
After setup, we will create a systemd service to automatically mount the remotes on boot.
The [email protected] file is a template service that can be used to mount any remote that you have configured
in rclone. To use it, enable the service with the name of the remote that you want to mount. For example,
if you have a remote named gdrive-personal, run the following command:
Now, every time you boot your system, the gdrive-personal remote will be automatically mounted. You can check the status of the service with the following command:
systemctl --user status "rclone@*"
Desktop Customization & Ricing
1. Text Editing
I use Neovim as my IDE and text editor. I recommend only customizing it thoroughly if you are going to use Neovim as your main text editor.
2. Audio & Video Setup
Install EasyEffects, OBS Studio, and its essential plugins..
# install EasyEffects and OBS Studioflatpak install -y flathub com.github.wwmm.easyeffects com.obsproject.Studiosudo dnf install -y v4l2loopback # To use OBS Studio's virtual camera feature# Create the `plugins/` directory in OBS Studio.mkdir -p ~/.var/app/com.obsproject.Studio/config/obs-studio/plugins# Optional; to use smartphone as webcam (proprietary software)flatpak install -y flathub com.obsproject.Studio.Plugin.DroidCam
Download and install Composite Blur plugin for OBS Studio.
Open Nautilus and open its preferences panel (CTRL+,)
General
EnableSort folders before files option
Optional Context Menu Actions
ShowCreate Link
ShowDelete Permanently
4. Update XDG Directories
I want my home directory to be clean as possible. Dotfiles are everywhere, but fortunately they can be hidden in Nautilus. However, default user directories that I do not frequently visit cannot be hidden. Edit the ~/.config/user-dirs.dirs file and move the directories to where you want to. Alternatively, you can run the following commands to move the Desktop/, Templates/, and Public/ directories inside ~/.desktop/.
# This file is written by xdg-user-dirs-update# If you want to change or add directories, just edit the line you're# interested in. All local changes will be retained on the next run.# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an# absolute path. No other format is supported.#XDG_DESKTOP_DIR="$HOME/.desktop/Desktop"XDG_DOWNLOAD_DIR="$HOME/Downloads"XDG_TEMPLATES_DIR="$HOME/.desktop/Templates"XDG_PUBLICSHARE_DIR="$HOME/.desktop/Public"XDG_DOCUMENTS_DIR="$HOME/Documents"XDG_MUSIC_DIR="$HOME/Music"XDG_PICTURES_DIR="$HOME/Pictures"XDG_VIDEOS_DIR="$HOME/Videos"
Just open Preferences, expand the palette grid by clicking the “Show All Palettes” button at the top right corner, and selecting Catppuccin Mocha. I also prefer an I-Beam so just at the bottom of the same panel, you can see Cursor > Cursor Shape and set it to I-Beam. Also disable Use System Font and set it to JetBrainsMono Nerd Font Mono Regular with size 10.
7. Language & Input Methods
Open Settings and go to Keyboard > Input Sources. Add the following languages:
Japanese (Anthy)
Korean (Hangul)
You can now write Japanese and Korean by switching to these languages using WIN+SPACE.
Back-Up Strategy
I use backrest to perform automatic backups of my system.
Why use backrest?
Backrest uses restic under the hood to perform backups. This means
that in a situation where I need to restore specific files or directories,
I can do so using the restic command line tool. Also, I can move
restic repositories anywhere I want.
Setting Up Backrest
First, install Backrest in your machine by following their installation guide.
curl -fsSL https://raw.githubusercontent.com/garethgeorge/backrest/main/install.sh | bashsystemctl status backrest.service # Check if the service is installed and running
If systemctl reports it as running, you should be able to access it in http://localhost:9898.
You may now add a new backup repository and configure it to your liking.
You can also check the Backrest documentation for more information.
Optional Modifications
Replace systemd-oomd with earlyoom
I have experienced many out-of-memory scenarios during my use of Fedora Workstation. For some reason, systemd-oomd never kicked in to kill the culprit that’s hogging the system memory. However, earlyoom has saved me (and my unsaved works and hundreds of Firefox tabs) numerous times so you might want to switch as well.
Technical Explanation
The two daemons operate differently:
systemd-oomd
“The primary mechanism used by systemd-oomd for detecting when the system is out of memory is memory pressure. Memory pressure measures the percentage of time a cgroup has “wasted” due to lack of memory. This includes time spent reclaiming free memory, faulting in recently resident pages, and loading in anonymous pages from swap.
When a monitored cgroup’s memory pressure exceeds the specified thresholds, systemd-oomd will perform action(s) on the targeted cgroup’s descendants, starting from the cgroups with the most reclaim scans. Reclaim activity is used here, rather than the largest consumer, as it reflects values set in the cgroup memory controller for memory protection (such as memory.low). ”
Now, to avoid conflicts, we need to disable systemd-oomd.
sudo systemctl disable --now systemd-oomd.service # 3. Stop and disable systemd-oomdsudo systemctl disable --now systemd-oomd.socket # 4. Disable systemd-oomd's socket as well.sudo systemctl mask systemd-oomd.socket # 5. Mask systemd-oomd so that it won't start again.
Finally, make sure that earlyoom is running and systemd-oomd has stopped.
systemctl status earlyoom.service \ # 6. Make sure earlyoom daemon is running, systemd-oomd.service \ # systemd-oomd has stopped, systemd-oomd.socket # and its socket masked.
Remote Connections
If you want to connect to your Fedora Workstation remotely, you can enable Remote Control and/or SSH.
Remote Control (RDP)
Open Settings and go to System > Remote Desktop.
Enable Desktop Sharing and Remote Control. Change the login credentials as you wish.
Secure Shell (SSH)
Open Settings and go to System > Secure Shell. Toggle the switch to “ON”.
Run the following command to secure your SSH server:
And with that, you have a fully customized Fedora Workstation installation. You can now remove the ~/Temp/SetupGuides-dotfiles
directory if you want to free up some space.
You can now enjoy your new operating system with all the tools and applications you need.
Every person has their own preferences, so feel free to explore and customize your system further to suit your needs.