Which Linux command or utility is simple, powerful, and surprisingly unknown to many people or used less often?
This could be a command or a piece of software or an application.
For example I’m surprised to find that many people are unaware of Caddy, a very simple web server that can make setting up a reverse proxy incredibly easy.
Another example is fzf. Many people overlook this, a fast command-line fuzzy finder. It’s versatile for searching files, directories, or even shell history with minimal effort.
A few that I use every day:
- Fish shell
- Starship.rs
- Broot (a brilliant filesystem navigator)
- Helix editor (My favorite editor / IDE, truly the successor to vim IMO)
- Topgrade (updates everything)
Just commenting to give more love to helix. It’s my favorite “small quick edits” editor.
I’ve actually been testing with fish recently coming from zsh, though I might wait until 4.0 fully releases before I make a more conclusive decision to move or not.
With that said, I remember looking through omf themes and stumbled onto Starship that branched off one of the themes and really liked the concept.
One thing that holds people back sometimes is that bash scripts that set environment variables don’t work by default. https://github.com/edc/bass is an easy solution
jq?
yq can do both JSON and YAML :)
grep goes crazy if you know your regex
I can never get grep to work consistently on Mac and Linux. Now, ripgrep OTOH…
That’s because Macs generally use BSD-based command line tools instead of GNU ones. You have to do a lot of Homebrew jiggery-pokery to approximate a GNU environment. Know Your Tools: Linux (GNU) vs. Mac (BSD) Command Line Utilities
Check out my chapter on GNU grep BRE/ERE for those wanting to learn this regex flavor: https://learnbyexample.github.io/learn_gnugrep_ripgrep/breere-regular-expressions.html (there’s also another chapter for PCRE)
I’m a big fan of
screen
because it will let me run long-running processes without having to stay connected via SSH, and will log all the output.I do a lot of work on customers’ servers and having a full record of everything that happened is incredibly valuable for CYA purposes.
I’d recommend
tmux
for that particular use. Screen has a lot of extras that are interesting but don’t really follow the GNU mentality of “do one thing and do it well.”Tmux / Screen is like the emacs/vim of the modern day Linux I think.
Screen is more than capable, but for those who have moved to Tmux, they will absolutely advocate for it.
I know everyone likes tmux but screen is phenomenal. I have a .screenrc I deploy everywhere with a statusbar at the bottom, a set number of pre-defined tabs, and logging to a directory (which is cleaned up after 30 days) so I can go back and figure out what I did. Great tool.
Woah screen is seeing active development again? There was like a decade where it stagnated. So much so that different distros were packaging different custom feature patches (IIRC only Ubuntu had a vertical split patch by default?) Looking at it now, the new screen maintainers had to skip a version to not conflict with forks that had become popular.
When tmux stabilized I jumped ship immediately and never looked back.
tmux with control mode in iterm is god mode for me on all my machines. Absolutely love it.
The pipe (
|
), which if you think about it is the basis for function composition.jq - super powerful json parser. Useful by hand and in scripts
GNU datamash (https://www.gnu.org/software/datamash/alternatives/) - handy tool for data munching. There’s also https://github.com/BurntSushi/xsv
I like https://github.com/aristocratos/btop personally. It’s way prettier than the normal top command which you use to watch processes to find the one that’s hogging all of the CPU or whatever. And it’s not so much that it’s underrated so much as it’s not very well known or distributed by default.
tmux - makes managing remote SSH sessions a breeze.
tomb - A little FOSS encryption utility that runs in the CLI. Easy, cute, effective. Tomb Utility
awk
…for parsing the output of other commands quickly and simply. Then that parsed output can be used to create simple log messages or be passed as args to other scripts. Powerful.
awk and sed have always been intimidating for me with that cryptic syntax.
I agree with your sentiment regarding confusing syntax, however I think that confusion simply requires a calculated approach to dispell it.
It’s a prime example of why I use scripts as reminders as much as I use them functionally. I work out the syntax once… save it to an example script, then save myself 20 minutes of remembering by just $ cat ./path/to/script.sh and copying said syntax.
So if you can change your workflow such that learned things stay around as examples, I feel that you will pick it up much more quickly :)
zoxide. It’s a fabulous
cd
replacement. It builds a database as you navigate your filesystem. Once you’ve navigated to a directory, instead of having to typecd /super/long/directory/path
, you can typezoxide path
and it’ll take you right to/super/long/directory/path
.I have it aliased to
zd
. I love it and install it on every systemYou can do things like using a partial directory name and it’ll jump you to the closest match in the database. So
zoxide pa
would take you to/super/long/directory/path
.And you can do partial paths. Say you’ve got two directories named
data
in your filesystem.One at
/super/long/directory/path1/data
And the other at
/super/long/directory/path2/data
You can do
zoxide path2 data
and you’ll go to/super/long/directory/path2/data
You can do
zoxide path2 data
I usually would just doz 2data
. Yes, I’m lazy. It’s the perfect tool for lazy people.Nice! I guess I can be even lazier when navigating!
find?
I’m not sure how underrated it is but the exec feature in
find
is so useful, there are so many bulk tasks that would just be incredibly difficult otherwise but instead are just one lineUse
less
for checking contents of files. Many people usecat
all the time, but I don’t like it, because if you do that often, your terminal window quickly gets flooded with stuff, and then you have to scroll up and down if you wanna see a previous output. Withless
, your file opens in a different “frame”, which you can close when you’re done.Try bat…
cat <your file> | more
Useless use of cat award!