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.
losetup
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.
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.
Man
xargs
glances! Way better than
top
and does a bazillion cool things!I loved glances until I switched to
btop
with Hot Purple Traffic Light theme, and I doubt I’ll switch again. Check it out!This looks very cool. Thanks for sharing.
Underrated
Both linked projects have over 60k+ stars on GitHub
Pick one
ncdu
CTRL-L to clear your terminal output. Or type clear
Also
Ctrl+D
to exit any shell andCtrl+R
for reverse searching your history!
awk
simple
Came here to say both of these things. (Awk and “> simple”.)
To be totally honest, I don’t think awk is any more complicated than something like grep, it’s just that regular expressions get used more often so they’re typically more familiar. In the same way that programming languages with c-like syntax (like Java and C#) often feel easier than ones that don’t (like Haskell and Clojure).
Awk is a turing complete programming language.
- 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.
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.
The mouse.
Bring on the downvotes. 🎉
🖕😤🖕
Hey, still the quickest way to copy any damn text from a terminal elsewhere is with the mouse. Tmux is a joke for this.
Why can’t terminal emulators just make this easy
Wezterm has made this easy : shift + ctrl + x and your in vim motion moving all over with yank line or word or visual mode. It’s super awesome! I never touch my mouse. You can also remap the keymap of course.
Gotta try this
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.
nohup
is similarI’ve had nohup fail to keep things running after my session ended quite frequently. It’s like it just goes to the next step in the process then gives up.
It’s likely that you’re using a systemd based system and the admin hasn’t enabled
linger
for your user.The servers are very locked down, so I’m sure that’s part of our compliance requirements. I haven’t looked into fixing it because I just wrote a script to hit Enter every 10 minutes to keep it alive.
Ha! Faking key presses, truly an elegant weapon for a more civilized age. If it works, it works.
It’s not as useful, sadly. Nohup disconnects standard input, output, and error. With screen or tmux, you can reattach them later.
There is also zellij, which can do the same but also has modern functionality specific for development workspaces!
(Although
screen
ortmux
will still probably be more widely available on remote machines etc)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.
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.
When tmux was first released I was already so used to screen that I never really considered switching. What would some convincing arguments be for me to make the effort to switch now?
This was a few years ago so maybe it has improved, but I found that screen would crash and lose my session history and layout too often. That was bad enough, but when it happened it had some bullshit error message about a dungeon roof falling in. I don’t mind some comedy in code or even the interface, but don’t make light of the user losing their stuff. I tried tmux and it is much more stable than screen was.
The thing that got me to switch was being able to maintain my pane layout between connections. The various window and pane management niceties (naming, swapping, listing and the like) got me to stay. Now you can keep your screen, but you’d have to pry tmux from my cold, dead, tty.
Tmux was purpose built for terminal multiplexing. You can assign session names for organizing and manipulating multiple instances. Send keys to and read output from detached sessions. It’s easy to script.
Tmux was purpose built for terminal multiplexing.
Was screen not purpose built for terminal multiplexing?
Sorry, it was, just not for exploring all of those instances at once. Should have called out the tiling function. Screen also built in a serial terminal emulator and started playing with a few other things.
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.
I think a lot of people don’t realise that yt-dlp works for many sites, not just YouTube
I used it recently for watching a video from tiktok without having to use their god awful web UI and it was amazing
Since everyone keeps mentioning yt-dlp I gotta ask: what’s wrong with the original youtube-dl? I keep using it, it works, it’s still being updated.
There are minor feature differences there’s also a convenience factor: youtube-dl people for some reason stopped doing releases, so you can’t get a fresh version from pypi (only installing from github or their site). Yt-dlp is on pypi, including nightly builds.
yt-dlp has sponsorblock features, youtube-dl does not.
It also supports ripping playlists. Fantastic to archive a set locally…
The huge list of sites can be found here https://github.com/yt-dlp/yt-dlp/tree/master/yt_dlp/extractor
Also works on Twitch with the added benefit of NOT playing ads (you still get breaks, just with a placeholder screen instead of the commercial).
mpv has yt-dlp support built in, so it can just play the streams directly.
kde connect