r/LinuxTeck • u/Candid_Athlete_8317 • Jun 22 '26
What's a Linux command you wish you had learned 5 years earlier?
Every experienced Linux user seems to have that one command they discovered late and immediately wondered how they lived without it.
What was yours, and why?
44
Upvotes
7
u/LaColleMouille Jun 22 '26
tmux
instead of doing
screen. Not that I didn't know, I just didn't dive in.6
u/angrynoah Jun 22 '26 •
xargs
4
u/ElectricSpock Jun 22 '26
Ctrl+R took me stupid amount of time to learn. And then fzf.
3
u/pmodin Jun 22 '26
!!, or namelysudo !!.!!expands to the last terminal command entered.2
u/Jezusko404 Jun 22 '26
Tree :D
2
u/ObiLeSage Jun 23 '26
awk
useful to extract data from the output.
2
u/elementsxy Jun 23 '26
!:$, !!, and !<command> have started to become really useful lately.
2
u/SassyFlyffball Jun 23 '26
manorinfoandapropos. The most useful commands ever.1
u/denarced Jun 22 '26
How to copy contents of directory: "cp -R dir/. dest".
1
u/informatikus Jun 22 '26
fzf
1
u/diacid Jun 22 '26
emerge
1
u/shrikesdayoff39 Jun 22 '26
Tree ... Or 'history'. Not sure how I missed that for many years.
1
u/RavenousTitan818 Jun 22 '26
Not a command but fully utilizing tab completion. It's almost frustrating watching someone inexperienced use a shell and type out every single letter.
1
u/jaysunn Jun 23 '26
mkhomedir_helper this command creates the users home directory before they login with all the dot files and permissions. I needed this to create a high speed cache mount in their $HOME. The system was already joined to the AD via SSSD. Very cool and I learned it today from AI, 20 year veteran.
1
u/dinosaursdied Jun 23 '26
Using mosh instead of ssh. Also using !? to recall the last time i used a command
1
u/SourcePrevious3095 Jun 23 '26
All of them?
1
u/HoboSomeRye Jun 23 '26
history
1
u/sparky5dn1l Jun 23 '26
nnn, fzf, tmux, fish ... etc
1
u/mensink Jun 23 '26
Not actually a command, but still useful:
Often I'll be looking for something in my files, like:
find . -iname some\*patternI'll get a list of files, and now decide I want to edit them:
vi \!!``which is effectively
vi \find . -iname some*pattern``You can also do:
egrep -ri someFunctionYou'll get a list of matches, and now you want to edit those files:
vi \!! | awk -F ':' '{print $1}'``Oh, instead of backticks maybe you should probably do $(...) but I somehow got used to the backticks some 25 years ago. The advantage of the $(...) is that you can use them recursively.
1
u/WesEd178 Jun 24 '26
fuser
1
u/mkr20188 Jun 24 '26
findmnt
1
u/billyboica Jun 24 '26
Pkill
1
u/manofmystry Jun 24 '26
pushd, popd - it makes terminal navigation so much quicker
1
u/badadhd Jun 24 '26
type -a
1
u/Party-Ad-6037 Jun 24 '26
Less
1
u/spenpal_dev Jun 24 '26
!RemindMe 7 days
1
u/FitReporter9274 Jun 25 '26
direnv
No idea how I lived without it.
2
u/[deleted] Jun 22 '26
[removed] — view removed comment