Linux Tips That Will Reverse Your Age
Just because you took intro to operating systems for your CS degree doesn’t make you good at Linux.

WHY?
I’m one of two sysadmins and my competition is a guy that started building Linux clusters the same year I was born. He’s also my boss. This is to say that I’m always aware of my knowledge deficit.
Typically what happens is I’ll share a terminal and we’ll get working on something. He’s usually driving when it comes to tasks that I haven’t worked on yet or if it’s something that he’s teaching me.
I’ve picked up some gems and I’m here to share them with you.
These are my favorite bits of Linux kung-fu. Some of these I use daily, others are good when you need to get out of a pinch.
Sane Configs
I can’t stand it when I see so many comments inside of a configuration file. Why do I need to see the entire documentation there? There’s a man page for the utility that I’m working with. The tool has an RTD online. Yet I’m greeted with this massive dyslexic nightmare of a file that I have to carefully read through.
I’m sure you can relate. It’s a waste of cognitive processing just to distinguish what’s a directive in the file versus what’s an explanation.
cat <config_file> | grep -vE '^(#|$)'
And for anyone that wants to be pretentious about it.
grep -vE '^(#|$)' <config_file>
Did I ever tell you I use vim?
Anyways …
Extracting RPMs
Sometimes you want some files that you would typically get from a DNF install, think config boilerplate, binaries, or you want to play around with the contents. The use cases are infinite.
Given that you’re likely working on a RHEL-based system, you are working with rpm files.
You’re able to extract the contents of an RPM into your current working directory and mess with the files as needed.
Let’s use neofetch as an example.
rpm2cpio neofetch-7.1.0–12.fc40.noarch.rpm | cpio -dium
We see that extracts everything in the same directory allowing us to view and work with the files directly
.
├── neofetch-7.1.0-12.fc40.noarch.rpm
└── usr
├── bin
│ └── neofetch
└── share
├── doc
│ └── neofetch
│ └── README.md
├── licenses
│ └── neofetch
│ └── LICENSE.md
└── man
└── man1
└── neofetch.1.gz
Finding What Installed with RPM
On a RHEL-based system, using which <tool> to see if you have a tool installed is not the most optimal way to see if something is installed. What if the binary is not in your current $PATH?
A more straightforward and sane approach is to use the rpm command to see what packages are installed.
I use this in two ways:
Searching for the specific package.
rpm -q hyprland
Doing a “broad stroke” search
rpm -qa | grep slurm
The difference is that the former will search specifically for the package called ‘hyprland’ whereas the latter will return all packages that contain ‘slurm’ in the name.
Kill a Specific User’s Processes
I’ll see some nonsense happening on login nodes and oftentimes the user who I want to blast off the system will actually be running something important.
To keep my hands clean and avoid the user opening a ticket, I’ll just kill the offensive processes, usually without them noticing. I pretend I’m performing surgery.
If I’m shooting for minimally invasive:
ps U <user> | grep <offensive_program> | awk '{print $1}' | xargs kill
If I’m taking the whole foot:
killall -u <user> -9
Closing
These are just a few that came to mind, I guarantee that I’ll remember a few that I’ll periodically use. Upon which I’ll share them.
Do you have any go-to command-line favorites?