Linux Configurations for Year 2025
Ghostty and fzf - a perfect pair for productive terminal work.
Introduction
I have been using Linux for about 30 years now. You might want to read some of my previous Linux-related blog posts, e.g. I switched from Ubuntu to Debian.
I had my traditional two-week winter vacation, and I spent some time configuring my Linux machine. In this new blog post I talk about these configurations.
Nvidia
Nvidia and Linux. There are going to be some possible challenges if you choose to go that way. At least I have experienced some challenges.
My current laptop has Nvidia Quadro T1000 Mobile graphics card. Debian standard packages provide rather old Nvidia driver. So, if you want to use a newer Nvidia driver, you have to download it from Nvidia Unix Driver Archive. I had driver version 560 which worked with Wayland, until it didn’t. I most likely broke my Debian+Wayland+Nvidia setup in some sudo apt upgrade
. Anyway, this time I spent some time on how to fix this issue permanently. And this time I hopefully found a more or less permanent solution.
I explain here briefly the configurations I did.
# First uninstall all previous Nvidia installations / packages:
sudo nvidia-uninstall
sudo apt purge '*nvidia*'
# Mask all nvidia services:
sudo systemctl mask nvidia-suspend.service
sudo systemctl mask nvidia-hibernate.service
sudo systemctl mask nvidia-resume.service
sudo systemctl mask nvidia-powerd.service
sudo systemctl mask nvidia-persistenced.service
# Check that they are masked:
sudo systemctl list-unit-files | grep nvi
# Update initramfs:
sudo update-initramfs -u
# Boot...
# Install latest 56* nvidia driver version (I installed 565).
# Boot...
# NOTE! Do not do any other configurations some pages suggest.
# Now, I have:
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
# => blacklist nouveau
cat /proc/driver/nvidia/params | grep PreserveVideoMemoryAllocations # =>
# => PreserveVideoMemoryAllocations: 0
I have kept in one terminal window the kernel messages to see if there are Nvidia driver related errors:
sudo dmesg -TW
No errors this far. Perhaps my Nvidia days of pain are now gone. So, most probably there was something with those Nvidia services (suspend…) that caused issues. I can lock my screen and when I login back to Wayland session, everything is ok with my laptop monitor and my three external monitors.
Ghostty
I have used years the Terminator terminal emulator. It has served me well all these years. I have a few often used key bindings, e.g. ctrl+shift+i
to start a new Terminator instance, ctrl+shift+o
to split the Terminator window horizontally, and alt+up
and alt+down
to navigate between the split windows.
But then I asked in the Koodiklinikka slack, in the #linux
channel, which terminal emulator might be a good modern choice. I list the candidates people suggested:
I decided to give Ghostty a try.
Ghostty has been really enjoyable terminal emulator. The configuration is really simple and straightforward. Most of the default configuration options are just fine. If you want to override e.g. some default key bindings, you can just create ~/.config/ghostty/config
file, and override those options that you want. For more information, see the Ghostty configuration documentation.
I did some Ghostty custom configurations, e.g. to make the navigation similar what I had used to with Terminator:
...
# THEME
# You can see a live theme view: ghostty +list-themes
theme = 0-Leuven-Kari-v3
# KEYBINDINGS
# You can list keybindings: ghostty +list-keybinds
# Use this to reload ghostty configuration.
keybind = unconsumed:ctrl+shift+p=reload_config
# Switch these two since I had in terminator ctrl+shift+o = new_split:down
keybind = ctrl+shift+e=new_split:right
keybind = ctrl+shift+o=new_split:down
# Navigate between splits.
keybind = alt+up=goto_split:top
keybind = alt+down=goto_split:bottom
# Switch these two since I had in terminator ctrl+shift+i = new_window
keybind = ctrl+shift+i=new_window
keybind = ctrl+shift+n=inspector:toggle
# Toggle fullscreen.
keybind = ctrl+alt+t=toggle_fullscreen
After changing something in your Ghostty configuration, it is really easy to reload the new configuration using your key binding for it (e.g. in my case, ctrl+shift+p
), and immediately see the changes.
For Ghostty, I created a few Leuven like themes:
λ> ll ~/.config/ghostty/themes/
-rw-r--r-- 1 kari kari 613 2025-01-05 17:45:53 0-Leuven-Kari
-rw-r--r-- 1 kari kari 566 2025-01-05 17:45:20 0-Leuven-Kari-v2
-rw-r--r-- 1 kari kari 602 2025-01-05 17:45:05 0-Leuven-Kari-v3
-rw-r--r-- 1 kari kari 804 2025-01-05 17:45:43 0-Leuven-Kari-v4
Using command ghostty +list-themes
it is easy to see the themes in action and compare the themes:
Ghostty theme viewer.
As you can see, there are a lot of prebuilt themes to select if you don’t want to create your own theme.
Fuzzy Finder
I used several years mcfly shell history tool. But a couple of weeks ago for some reason I couldn’t traverse through by bash history with up/down keystrokes - and I pinpointed that for some reason this was caused by mcfly. I once again consulted Koodiklinikka speacialists if there were other good shell history tools, and several people suggested fzf, a command-line fuzzy finder.
Fzf is really good. So good, that I didn’t bother to investigate the mcfly issue any more but ditched mcfly out of my Linux boxes and decided to use fzf instead in the future. Basically, fzf is just a list selection tool. You can pipe any standard output to fzf and see the output as a list.
There are three preconfigured fzf key bindings:
ctrl-r
: Show shell history in the fzf list. When you choose some item in the list you get it in your shell prompt in editing mode.ctrl-t
: Show files in current working directory in the fzf list. When you choose some item in the list you get it in your shell prompt in editing mode.alt-c
: Show subdirectories in the fzf list. When you choose some item in the list you get achange directory
to that item.
But fzf can do a lot more than that. I have all my previous bash histories stored in files like .bash_history_backup_YYYY-MM-DD
(the date I created the bash history backup file). I have a script hist-all
which searches a string in all of my bash history backup files. Using fzf I can easily browse the items - in the fzf list view you can search the items using fzf search syntax.
E.g. this command:
hist-all update | uniq | fzf | wl-copy
… greps string update
from all of my bash history backup files, then uniq
creates a list of unique items that consist string update
, and pipes the list to fzf. Finally, using fzf I can search the items further and select one - and the output goes to the Wayland copy command wl-copy
which copies the item to the clipboard, and I can paste the item from the clipboard.
Another example. What if I have a code base with a lot of git repos and thousands of Python files inside them. I vaguely remember that the python file possibly had string user
in its file name. Just list the python files with the excellent fd tool, and pipe the results to the fzf:
fd -e py | fzf
Fzf list.
I used one of my practice git repos as a test bench, not having thousands of Python files, but I guess you got the point. Now you can search the list using fzf search functionality:
Fzf selector.
Another example. I just installed the bat tool ( a better cat):
sudo apt update
sudo apt install bat
...
bat # => bash: bat: command not found
which bat # => Nothing.
So, did it install it or not?
Let’s find bat
(using locate utility and fzf):
sudo updatedb # First update the file database.
locate bat | fzf # Search it and pipe the results to fzf.
Fzf list.
Gosh! 9428 files with string bat
! Let’s refine the search a bit, utilities are most probably in the /usr/bin
folder in Linux:
Fzf selector.
Ah! The actual utility name is not bat
it’s batcat
! Let’s create an alias for it: alias bat='batcat'
You can find a lot more complicated examples in the fzf examples page.
Conclusions
Using a good terminal emulator and command-line tools can make your Linux work more productive. I have used Ghostty and fzf now a couple of weeks, and I have been really happy with these tools. I can recommend them to you, too.