Almost every Linux CLI tool that requires you to edit a file will consult the `EDITOR` environment variable to spawn the editor you prefer. If you want to use `nano` instead of `vim`, set it as your default editor like this:
`export EDITOR=nano`
I code in the Linux shell with tools that follow the Unix philosophy, "Do one thing, and do it well". One of these tools is `ripgrep`. It's like `grep`, but searches recursively by default, and can filter file types (`-trb` for Ruby).
You might be familiar with the Linux shell aliases that you can use to run complicated commands by typing a more convenient one.
But did you think of using aliases to automatically fix typos? For example, why not save yourself from going "Gerp" by defining `alias gerp=grep`?
I just set up a monthly donation to Mozilla to support #Firefox. It's such an important part of my desktop and mobile toolset that it makes sense for me to support it financially as well.
Today, I spent hours trying to install #Bluefin on an older laptop. The process always failed with "Failed to write boot loader configuration". I tried vanilla #Fedora Silverblue; same result. Finally, I installed Fedora Workstation and booted it successfully.
Following a tip found on the Bluefin Discord, I did "fwupdmgr refresh && fwupdmgr update", boosting the UEFI firmware from something like v54 to v379. And just now, the Bluefin installer says "Complete!"
Always update the BIOS first.
LIVE NOW! Time for my weekly DevOps/SecOps/SRE office hour. If you have any questions about #Linux, #SystemAdministration, #Ruby, #DevOps, or any other engineering topic, join the live stream and ask them!
Tabs vs spaces has always been a controversial topic. Thankfully, #vim isn't biased in any way.
To convert spaces to tabs, use `:set noexpandtab`, then `:retab!`.
Convert tabs to spaces with:
:set expandtab
:set tabstop=4
:set shiftwidth=4
:retab
Tip for Linux shell beginners: Execute a second command only if the first one was successful.
`command_1 && command 2`
Background: This compound command uses the result code returned by `command_1` with the "shortcircuit" behaviour of the "logical AND" `&&` operator.
Not only can you use `tail -f <file>` to continuously output a file (a service log, for example) while it's being written, you can even filter specific keywords in the process:
`tail -f myfile | grep <keyword>`
Did you know there are variants of common Linux shell tools that have decompression function built in? For example, instead of first uncompressing a file to then view it in `less`, you can simply use `zless`.
There's also `zcat`, `zgrep`, `zcmp` and`zdiff`.