Which Linux tool or command is surprisingly simple, powerful, and yet underrated?"
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.
Run it normally and it just spams 'y' from the keyboard. But when one of the commands above is piped to it, then it will respond with 'y'. Not every command has a true -y to automate acceptance of prompts and that's what this is for.
nmap 192.168.1.43/24 will show you what devices are connected to the local network, and what ports are open there. really useful, for example, when you forgot the address of your printer or raspi yet again.
you can also use it to understand what ports on your computer are open from an attacker's perspective, or simply to figure out what services are running (ssh service).
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 type cd /super/long/directory/path, you can type zoxide 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 system
You 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
it's useful for dealing with virtual disk images. like a real physical hard disk, but it's a file on the computer. you can mount it, format it, and write it to a real physical disk.
it's sometimes used with virtual machines, with iso images, or when preparing a bootable disk.
I know tmux is incredibly popular, but a good use case for it that isn’t common is teaching people how to do things in the terminal. You can both be attached to the same tmux session, and both type into the same shell.
ddccontrol... it looks complicated on the surface but it's really not and being able to control monitor brightness without fcking around in some garbage monitor OSD is a god sent and should be the standard
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.
Underrated? I'd say lftp is the best FTP command line client there is. And Midnight Commander is a very very good file browser. I don't see either praised enough.
yq is crazy cool for converting between different text-based data formats such as yaml, json, xml, csv and others, and it has a super nice pretty-printing function as well. I use it all the time!
Just be aware that your distroy might come with a yq variant too, but possibly one that isn't as powerful as the one I linked. I know this to be true at least for Ubuntu.
After spending years dealing with shady freeware and junk software on windows, I was floored by how easy and nonchalantly I was able to set up a simple security camera on my PC
dd is probably well known, but one of the simplest and most powerful ways to accidentally delete all data on your hard drive. dd if=/dev/random of=/dev/sda
The first incantation - ip address (you can abbreviate whilst it is unambiguous) gets you a quick report of interfaces, MAC, IPs and so on. The second command assigns another IP address to an interface. Handy for setting up devices which don't do DHCP out of the box or already have an IP and need a good talking to.
Oh and you can completely set up your IP stack, interfaces and routing etc with it. Throw in nft or iptables (old school these days - sigh!) for filtering and other network packet mangling shenanigans.
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.
tmsu is pretty cool - it creates a little db and uses that to track tags on your files without ever touching them. It also has it's own little tag based filesystem.
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 line
Use less for checking contents of files. Many people use cat 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. With less, your file opens in a different "frame", which you can close when you're done.
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.
the (usually rust-based) coreutils "alternatives" like bat, fd, eza, procs
trash-put (rm with trash integration. But beware that it also operates on directories by default, which rm only does with -r. There should be an option to change that behavior but there isn't. Don't alias rm to this)
wl-copy/paste (or the older one for X11, 'xclip' IIRC. Enables you to do stuff like "cat image.jpg | wl-copy" to copy it to the clipboard. Best alias it to something shorter)
xdg-open (open the file using your associated program for that file type. Alias to "o" or so)
pass (awesome password manager, when you have a GPG key pair. Even better in combination with e.g. wofi)
notify-send (to send GUI notifications from shell scripts)
ledger (plain-text accounting software. If you use Emacs you should take a look at this as it's written by an Emacs dev, and has good integration of course)
degit is a tool that will check out a git repo (or a specific branch or commit), but not set it up as a git repo. Basically just downloading a specific commit to a directory.
..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.
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.
+1 to caddy. There are some services that set safe headers following the recommendations outlined by Mozilla but others don't control headers as strictly. Caddy is the only web server that I found that supports loose default header values. These values will be selected unless the upstream application specifies their own values.
You can do something similar in nginx but it requires playing with maps and has a little more indirection than I'd like.
Just wish caddy was capable of starting as root and stepping down permissions like Nginx. I have certs being managed by other tools and have to make sure they are installed and chowned for caddy's use when they are cycled.
ia: internetarchive https://archive.org/developers/internetarchive/cli.html cli tool, i only use it for downloads, it can a bit more than the eye meets first, like accepting a wildcard to download certain files or specify other stuff. I have an incomplete script to help me with that, which I want to share in the future. The only problem is, that the internetarchive at archive.org is often very slow at downloading.
I use node as a calculator a lot. It can be dangerous, because it suffers from floating point errors, but it’s generally more powerful than a calculator if you know the Math lib well.