this post was submitted on 03 Jan 2025
228 points (100.0% liked)

Linux

1261 readers
82 users here now

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

Related Communities

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

founded 5 years ago
MODERATORS
 

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.

top 50 comments
sorted by: hot top controversial new old
[–] dessalines@lemmy.ml 66 points 2 weeks ago (11 children)

A few that I use every day:

[–] Trent@lemmy.ml 12 points 2 weeks ago

Just commenting to give more love to helix. It's my favorite "small quick edits" editor.

load more comments (10 replies)
[–] pastel_de_airfryer@lemmy.eco.br 46 points 2 weeks ago (7 children)
[–] Revan343@lemmy.ca 11 points 2 weeks ago

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

load more comments (6 replies)
[–] davel@lemmy.ml 29 points 2 weeks ago

The pipe (|), which if you think about it is the basis for function composition.

[–] Sickday@kbin.earth 28 points 2 weeks ago (1 children)
[–] BaumGeist@lemmy.ml 9 points 2 weeks ago (1 children)
load more comments (1 replies)
[–] thejevans@lemmy.ml 28 points 2 weeks ago (3 children)
[–] deadcream@sopuli.xyz 13 points 2 weeks ago

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.

load more comments (2 replies)
[–] jollyroberts@jolly-piefed.jomandoa.net 27 points 1 week ago (3 children)

Control+r == search through your bash history.

I used linux for ten years before finding out about that one.

load more comments (3 replies)
[–] wasabi@lemmy.eco.br 26 points 2 weeks ago (2 children)

I find myself using tldr a lot since finding out about it. It's just so useful for commands that I don't use enough to commit to memory.

load more comments (2 replies)
[–] hperrin@lemmy.ca 22 points 2 weeks ago (1 children)

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.

load more comments (1 replies)
[–] harsh3466@lemmy.ml 20 points 2 weeks ago (1 children)

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

load more comments (1 replies)
[–] lig@lemmings.world 18 points 2 weeks ago (1 children)

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.

load more comments (1 replies)
[–] BCsven@lemmy.ca 17 points 2 weeks ago (1 children)

CTRL-L to clear your terminal output. Or type clear

[–] danielquinn@lemmy.ca 13 points 2 weeks ago

Also Ctrl+D to exit any shell and Ctrl+R for reverse searching your history!

[–] UpperBroccoli@lemmy.blahaj.zone 17 points 2 weeks ago (2 children)

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.

load more comments (2 replies)
[–] WalnutLum@lemmy.ml 17 points 1 week ago (2 children)
bc

It's a simple command line calculator! I use it all the time.

load more comments (2 replies)
[–] digdilem@lemmy.ml 15 points 2 weeks ago (2 children)

yes

The most positive command you'll ever use.

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.

load more comments (2 replies)
[–] sirico@feddit.uk 14 points 1 week ago (2 children)
load more comments (2 replies)
[–] eldereko@lemmy.dbzer0.com 14 points 2 weeks ago* (last edited 2 weeks ago) (5 children)

+1 for Caddy, completely replaced nginx. also...

load more comments (5 replies)
[–] GenderNeutralBro@lemmy.sdf.org 14 points 2 weeks ago

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.

[–] bbbhltz 14 points 2 weeks ago (2 children)

Pandoc, FFMpeg, ImageMagick

[–] N0x0n@lemmy.ml 10 points 2 weeks ago (4 children)

FFMpeg Simple and underrated? Not sure about that.

load more comments (4 replies)
load more comments (1 replies)
[–] beeng@discuss.tchncs.de 14 points 2 weeks ago (1 children)

Using rust rewrite of coreutils you can cp -g to see progress. Set an alias :)

load more comments (1 replies)
[–] whelk@lemm.ee 13 points 2 weeks ago

I love ncdu for seeing where all my storage is being taken up.

[–] Lettuceeatlettuce@lemmy.ml 12 points 2 weeks ago

tmux - makes managing remote SSH sessions a breeze.

tomb - A little FOSS encryption utility that runs in the CLI. Easy, cute, effective. Tomb Utility

[–] ravermeister@lemmy.rimkus.it 12 points 2 weeks ago (1 children)

I think socat is a really powerful und underrated tool

load more comments (1 replies)
[–] bamboo@lemmy.blahaj.zone 10 points 2 weeks ago (2 children)

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

load more comments (2 replies)
[–] jagged_circle@feddit.nl 10 points 2 weeks ago
[–] Matombo@feddit.org 10 points 1 week ago

kde connect

[–] ClusterBomb@lemmy.blahaj.zone 10 points 2 weeks ago (1 children)

Discovered about rg recently and it is cool!

load more comments (1 replies)

socat - connect anything to anything

for example

socat - tcp-connect:remote-server:12345

socat tcp-listen:12345 -

socat tcp-listen:12345 tcp-connect:remote-server:12345

[–] Lemmchen@feddit.org 10 points 2 weeks ago

pipeviewer or pv

[–] kyub@discuss.tchncs.de 9 points 2 weeks ago
  • awk
  • 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)
  • nc
  • nohup
[–] corsicanguppy@lemmy.ca 9 points 2 weeks ago (2 children)
  • xargs
  • parallel
  • PXE (ohai cobbler)
  • tee
  • task-spooler (ts aka tsp)
  • rpm -V

Nothing new, just forgotten.

load more comments (2 replies)
[–] krolden@lemmy.ml 8 points 2 weeks ago
[–] VinesNFluff@pawb.social 8 points 1 week ago* (last edited 1 week ago)

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

[–] AnnaFrankfurter@lemmy.ml 8 points 1 week ago
[–] toastal@lemmy.ml 8 points 1 week ago (1 children)

netstat -tunl shows all open ports on the machine to help diagnose any firewall issues.

load more comments (1 replies)
[–] ubergeek@lemmy.today 8 points 1 week ago (1 children)
load more comments (1 replies)
[–] kittenroar 8 points 2 weeks ago

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.

[–] deathbird@mander.xyz 7 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

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.

load more comments (2 replies)
[–] learnbyexample@programming.dev 7 points 2 weeks ago (1 children)
load more comments (1 replies)
load more comments
view more: next ›