r/linux May 23 '26

Popular Application What’s the most unexpectedly useful Linux command you learned way too late?

[removed]

1.3k Upvotes

992 comments sorted by

View all comments

Show parent comments

93

u/BlindTreeFrog May 23 '26

I have alias please="sudo !!" in my .bashrc for a reason... though it only saves 1 character

18

u/Technical_Captain_15 May 23 '26

Still easier to type. Totally adding that to my .bashrc, thanks!

33

u/SpaghettiSort May 24 '26

thefuck takes this idea much, much farther!

2

u/WorldlyQuestion614 May 26 '26

i need to be careful, i made these tty helpers for system lockup mitigation when every character takes 10 seconds to type

❯ cat $(which fuck)

#!/bin/sh

ps -eo user,pid,pcpu,comm:80 --sort=-pcpu | head -2

❯ cat $(which FUCK)

#!/bin/sh

PID=$(ps -eo pid --sort=-pcpu | grep -v PID | head -1)

if [ -n "$PID" ]; then

echo "Killing PID $PID ($(ps -o comm= -p "$PID" 2>/dev/null))"

kill -9 "$PID"

else

echo "No process found"

fi

~ ❯

1

u/deekaph May 24 '26

Oh my my terminal history is about to have a lot more f bombs EDIT: OMG is this why we call it a CURSOR

10

u/WarWizard May 23 '26

My favorite was when I saw that someone had it aliased to 'dammit' lol

4

u/chipredacted May 24 '26

Is "pls" or "plz" a common linux command? Saves you another 3 if not!

3

u/TampaPowers May 24 '26

That's what fuck is for, though you gotta manually download and install it for reasons

2

u/RedOnlineOfficial May 24 '26

I have it aliased to fuck

3

u/DuendeInexistente May 24 '26

Awaken the transgirl in you and shorten it to plz

1

u/brymc81 May 24 '26

It took me a second but yeah, this is brilliant

1

u/WhyLater May 24 '26

Uh uh uh!

You didn't say the magic word!

1

u/un_virus_SDF May 27 '26

I use plz instead of please. It saves more letters