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.
Underrated or not widely known?
I love lazygit and I’m still surprised at how many people are shocked when they see it for the first time. Not exactly a command, but a very handy text UI tool.
For more elementary tools, I can’t believe how many people know about ! and ctrl+r who don’t also know about fc and edit-and-execute-command.
Lazygit perfectly fits my lifestyle:) thanks for sharing
Not powerful, but often useful,
column -t
aligns columns in all lines. EG$ echo {a,bb,ccc}{5,10,9999,888} | xargs -n3 a5 a10 a9999 a888 bb5 bb10 bb9999 bb888 ccc5 ccc10 ccc9999 ccc888 $ echo {a,bb,ccc}{5,10,9999,888} | xargs -n3 | column -t a5 a10 a9999 a888 bb5 bb10 bb9999 bb888 ccc5 ccc10 ccc9999 ccc888
wait, shell could make matrix multiplication ?
No, that’s just brace expansion.
batcat
It’s like cat but better. Great for when you just want to look at the contents of a file, without loading a whole text editor.
Oh also, tldr
My procedure for learning how to use a cli command goes tldr page -> --help if the tldr fails to help me -> THEN the full manpage
I like batcat aka bat, but nominate the humble ‘cat’ instead.
Want to copy a disk image to a device? You can use cat for that:
cat file.iso>/dev/sdf
What to copy local stdout over ssh? Use cat.
ls -l | ssh myhost 'cat >out.txt'
That’s simple and surprisingly powerful.
I’ve used it in high-throughput production environments to do things that netcats can’t.
paste. I don’t think a lot of people know this command, but it can be handy at times
|
Honorary mention to
<
and&
Came here for the pipe.
As someone who has to do installs and admin a lot at work I’m constantly dealing with yum/dnf. I cry when I have to work with AIX.
Don’t run
killall
on aix before reading the man page!It sounds scary lol
What is AIX
Maybe it’s the old IBM AIX https://en.m.wikipedia.org/wiki/IBM_AIX
An OS used by IBM on their mainframes. I have to work with it because some big orgs, especially financial and gov, still use it and run our apps on it.
We install
dnf
on our AIX boxes. Works okayish.I tried grabbing it and couldn’t even get it to install. If you have a link to a good install…
I can’t find the docs I followed, but this seems to be more or less the same process: https://www.ibm.com/support/pages/node/6585774
There are version-specific AIX Toolbox installation scripts, so make sure you’ve got the right version (
oslevel
should help).I think the version issues blocked me. I’ve put the toolbox on some of our test systems but dnf seems to be excluded from it. I’d probably have to build it.
I don’t see anyone mentions
htop
. So, I will:) Just works, could be installed in any distro. Much more friendly than top but isn’t bloated with features as some other alternatives are.Bashtop if you want something more graphical
My fav for the past few years is https://github.com/ClementTsang/bottom
Check out BTOP++ – it blows htop out of the water.
- xargs
- parallel
- PXE (ohai cobbler)
- tee
- task-spooler (ts aka tsp)
- rpm -V
Nothing new, just forgotten.
task-spooler (ts aka tsp)
This looks amazing. Do you know how well it works in dispatching and tracking jobs over remote servers (over SSH)?
We’ve been using tsp at my work for years and it works well. It is just a very basic queueing system so if you can run the job from the command line then you can run it via tsp.
Our workflow is to have concurrent jobs run on the remote servers with cron and tsp but you should be able to trigger remote jobs over SSH also if you prefer to have a single machine in charge of task allocation.
Very true. I used to do magic with xargs when working as a sysadm. Also a good way to mess up on a grand scale. Ask me how I know.
So, how do you know?
By not testing it properly before running it over the whole file system resulting in a few hours of extra work cleaning up the mess I made.
Bat, a cat alternative.
Lsd, an ls alternative.
Procs, a ps alternative.
Renane, because it’s great.
Love LSD. I always install it first with btop and zoxide
Zoxide? Will check it out. Thanks.
vd
(VisiData) is a wonderful TUI spreadsheet program. It can read lots of formats, like csv, sqlite, and even nested formats like json. It supports Python expressions and replayable commands.I find it most useful for large CSV files from various sources. Logs and reports from a lot of the tools I use can easily be tens of thousands of rows, and it can take many minutes just to open them in GUI apps like Excel or LibreOffice.
I frequently need to re-export fresh data, so I find myself needing to re-process and re-arrange it every time, which visidata makes easy (well, easier) with its replayable command files. So e.g. I can write a script to open a raw csv, add a formula column, resize all columns to fit their content, set the column types as appropriate, and sort it the way I need it. So I can do direct from exporting the data to reading it with no preprocessing in between.
Using rust rewrite of coreutils you can
cp -g
to see progress. Set an alias :)Where can this variant of coreutils be found? This is the first time I have heard of it.
Holy shit I was just talking about cp with progress today. Awesome
probably well known at this point but rsync is incredible and I use it all the time