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.

84 points

A few that I use every day:

permalink
report
reply
21 points

I heard about helix from you and I’ve used it for a year and a half or so now, it’s by far the best editor I’ve used so far and I can definitely vouch for it

permalink
report
parent
reply
6 points

Nice!

permalink
report
parent
reply
15 points

Just commenting to give more love to helix. It’s my favorite “small quick edits” editor.

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
6 points

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

permalink
report
parent
reply
2 points

Helix is great thanks

permalink
report
parent
reply
2 points

Once Helix gets plugin support and someone makes a Clojure REPL plugin as good as Conjure I am never touching vim again!

permalink
report
parent
reply
0 points

It does have clojure lsp support, but you’ll probably have to use a command line for most repls.

permalink
report
parent
reply
2 points

Yeah the clojure lsp support is top notch, but there being no support for “jacking in” to a repl is the big thing keeping me from using helix full time. There’s a way of doing it if you use kitty, but it’s pretty janky.

permalink
report
parent
reply
1 point

Could you explain them in more depth? I opened them and don’t know

permalink
report
parent
reply
7 points

Helix is a terminal based text editor. It’s much like vim / neovim, but unlike those editors it’s good to go right out of the box, no configuration or plugins needed to make it work well.

Topgrade is one I haven’t used, but it looks like its intended purpose is to let you upgrade your apps with one command, even if you use multiple different package managers (I.e. if you were on Ubuntu, you could use it to upgrade your apt packages, at the same time as your snap packages, as well as flatpak, nix, and homebrew if you’ve added those.)

permalink
report
parent
reply
2 points

Thank you for explaining. I would never have understood topgrade without your example :)

permalink
report
parent
reply
3 points

Fish is a replacement of bash that’s a bit more user friendly (has some cool auto completion features out of the box and more sane behaviour like handling of spaces when expanding variables). I personally started to use nutshell recently but unlike fish it’s very different from bash.

Starship is a “prompt” for various shells (that bit of text in terminal before you enter the command that shows current user and directory in bash). I haven’t used it but AFAIK it has many features like showing current time, integration with git, etc.

permalink
report
parent
reply
6 points

Yep, here’s my Starship prompt, for example:

So, I have it configured to show:

  • the exit code of the last command (if it’s non-zero),
  • the duration of the last command (if it’s longer than 2 seconds),
  • the time (when the last command ended),
  • the current directory,
  • the current Git branch, and it also shows some Git status information, for example the $ means I have something stashed,
  • and finally the technology in use in a repository/directory, so in this case that repo uses Rust and the compiler version is 1.83.
permalink
report
parent
reply
1 point

Thanks!

permalink
report
parent
reply
84 points

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

permalink
report
reply
24 points

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.

permalink
report
parent
reply
3 points

Wait how?

permalink
report
parent
reply
8 points
*

mpv --ytdl URL. Read starting from --ytdl option in the mpv man page, you can even give specific yt-dlp options through --ytdl-raw-options.

permalink
report
parent
reply
8 points

I just run mpv $URL

permalink
report
parent
reply
9 points

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.

permalink
report
parent
reply
17 points

yt-dlp has sponsorblock features, youtube-dl does not.

permalink
report
parent
reply
3 points
*

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.

permalink
report
parent
reply
1 point

The huge list of sites can be found here https://github.com/yt-dlp/yt-dlp/tree/master/yt_dlp/extractor

permalink
report
parent
reply
1 point

It also supports ripping playlists. Fantastic to archive a set locally…

permalink
report
parent
reply
60 points

I use fuck to fix typos

permalink
report
reply
11 points

That’s fantastic, I can’t wait to go home and install it

permalink
report
parent
reply
6 points
*

If you’d map it to just f it’s even more handy

permalink
report
parent
reply
2 points

You gain efficiency, but lose fun

permalink
report
parent
reply
2 points

this just reminds me of please which runs the previous command with sudo

permalink
report
parent
reply
2 points
sudo !!

Will also run the previous command with sudo, fwiw.

permalink
report
parent
reply
2 points

Game changer!

permalink
report
parent
reply
2 points

That sounds dangerous. I hope it never tries to fix anything with rm

permalink
report
parent
reply
10 points

You have to confirm any command before it runs, so no more dangerous than baseline rm

permalink
report
parent
reply
1 point

I use fuckit to fix exceptions

permalink
report
parent
reply
44 points

grep goes crazy if you know your regex

permalink
report
reply
23 points
28 points

I was expecting this one.

permalink
report
parent
reply
7 points

I thought you meant this one

permalink
report
parent
reply
4 points

I can never get grep to work consistently on Mac and Linux. Now, ripgrep OTOH…

permalink
report
parent
reply
7 points

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

permalink
report
parent
reply
3 points

Alas, doesn’t fit my purpose since it requires action by the script user. I usually just use perl in those situations

permalink
report
parent
reply
2 points

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)

permalink
report
parent
reply
41 points

jq?

permalink
report
reply
13 points

I use it occasionally but every time I need to do something a tiny bit more complex than “extract field from an object” I have to spend half an hour studying its manual, at which point it’s faster to just write a Python script doing exactly what I need it to do.

permalink
report
parent
reply
4 points

Check out https://www.nushell.sh/ I use it for exactly that, i.e. complex extract and convert files

permalink
report
parent
reply
1 point

I actually installed it recently out of curiosity, but I’m hesitant about learning its advanced features like that. At least jq is a standalone tool that’s more ubiquitous than nushell, so you can rely on it even in environments that you don’t fully control (e.g. CI like GitHub Actions). And if you use it in some public code/scripts then other people will be more familiar with it too.

permalink
report
parent
reply
11 points

yq can do both JSON and YAML :)

permalink
report
parent
reply
4 points

https://github.com/johnkerl/miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON

permalink
report
parent
reply
2 points

Funny how this was one of the first tools I learnt once I “seriously” started my linux journey, lol

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 6.9K

    Monthly active users

  • 6.8K

    Posts

  • 185K

    Comments