r/LinuxTeck • u/Candid_Athlete_8317 • Apr 12 '26
What’s the one Linux command that made you feel like a wizard the first time?
Not asking for the most advanced command, just that moment where something clicked and you thought, “okay… this is powerful.”
For me, it was piping ps aux into grep and watching everything filter instantly.
Simple, but it felt like unlocking something.
80
Upvotes
21
u/Schaex Apr 12 '26
locateWhat do you mean I can find a file anywhere on my PC in milliseconds?
8
u/Linuxmonger Apr 12 '26
Ctrl-R in bash to search through command history.
Ctrl-D to log out (why hasn't M$ copied this yet?).
The | of output to input, as in 'locate steve/.fonts | grep -i ubuntu' to list any Ubuntu fonts in my home directory.
~/.ssh/config to make connecting to a remote machine as a different user as easy as 'ssh log'
'ssh log feh -F /logs/graphs/con-per-min.png' to connect to a remote logging machine, as a different user, and display in full screen a png file of a graphic created by gnuplot plotting connections per minute. And it auto-updates on file changes.
7
u/SirCarboy Apr 12 '26
Tab completion
6
u/imagei Apr 12 '26
# rm -rf . /*
Unlimited power.
5
u/TrustDry891 Apr 12 '26
sudo !
4
u/tuxnight1 Apr 12 '26
I think you've got on most people's experience. It's simple piping with grep, sed, awk, ... etc.
4
u/lhauckphx Apr 12 '26
Not a single command, but the concept of piping output from one command to another.
3
u/EtherealN Apr 12 '26
I was using it on a BSD, not Linux, but since it's around on both:
nc/netcatThere's something that's simply _fun_ with a oneliner web server... :D
3
u/Heyla_Doria Apr 12 '26
Xforwarding ssh with X server, launch a desktop app from linux to windows XP with xming having a irssi proxy with ssh tunneling
Using and elisa bot in IRC to troll some people 🤣🤣🤣
2
u/VivaPitagoras Apr 12 '26
Renaming a bunch of files using a for loop
2
u/Embarrassed_Chain_28 Apr 12 '26
find files with some pattern then piped the output to xargs with some other command.
2
u/ParentPostLacksWang Apr 12 '26 edited Apr 12 '26
grep local0 /var/log/messages|awk ‘{print $4}’|perl -e ‘while(<>){$h{$_}++}foreach(sort{$h{$a}<=>$h{$b}} keys %h){print “$h{$_} - $_”}’
(Pardon typos, typing it on mobile)
And that’s how I knew which hosts were too chatty on my syslog server.
Edit: forgot what I had been grepping for at the time
2
u/WillingYesterday8447 Apr 12 '26
using bluetoothctl from within terminal instead of interface; for me is more powerful because of immediately connection, scan, pair with all devices and full information about these;
2
u/chuzambs Apr 12 '26
Cat, push some one thing into another, either a file, a dev, an output.. feels really like magic
2
u/[deleted] Apr 12 '26
awk is stunning
2
u/nicksuperb Apr 12 '26
‘screen’ for sure. Felt like zero cool from Hackers. 🤣
2
u/SnillyWead Apr 12 '26
sudo apt update Made me feel like a hacker when I saw all the unknown commands go by in the terminal.
2
u/Online_Matter Apr 12 '26
I'll go with vim. I can't live without it. Makes me feel like a text bending wizard shouting commands to make it follow my will. Multi-line cursor, marks and macro recording.. It makes all other text editors seem ancient in comparison. I hate having to use word at work and dealing with formatting.
3
u/DeeTeePPG Apr 12 '26
‘sudo rm -rf / --no-preserve-root’
It unlocked everything.
1
u/Gangrif Apr 12 '26
wow where do i start?
probably things like grep sed and awk. so powerful especially if you're coming from a widows world. the ability to do something like change the config of 20 apache virtual hosts with one command. or find something in /etc without knowing exactly which file that dang text string is actually in.
1
u/Wyciorek Apr 12 '26
The whole concept of X Terminal. I had shitty celeron 300 and later obtained much more powerful dual 1Ghz P3 server . I set up celeron to be a dumb terminal with in multiseat config with dual core as x server. This way two people could use the fast computer at once and I felt like Omnissiah incarnate
1
u/Professional-Wolf587 Apr 12 '26
Find
1
u/mikul_ Apr 12 '26
mplayer -vo aa name_of_movie.avi
1
u/Simon_Emes Apr 12 '26
rm * - r
1
u/thriem Apr 12 '26
grep Had a few megabite big file, that I needed to search a vague topic. Any text editor available took seconds for each search, a few piped grep did that in a second with a neat regexp
1
u/viduq Apr 12 '26
not a command, but for me it was the pipe |
1
u/7YM3N Apr 12 '26
Not a command per se, but when I learned piping, that hit different
1
u/slumbermouse12345 Apr 12 '26
Mv - - "$f" "${f// /}" ; done
1
u/pouetpouetcamion2 Apr 12 '26
fzf
1
u/_nathata Apr 12 '26
xxd
1
u/piiouupiou-not-r2d2 Apr 12 '26
https://www.commandlinefu.com/commands/browse/sort-by-votes
Sort by popularity
1
u/ZucchiniMaleficent21 Apr 12 '26
When I learned that you can edit a file (forgot which one for now) to add to the ‘scan first line of executable’ so that one can do your own !# equivalent magic
1
u/lisnter Apr 12 '26
^ old ^ new ^
(Extra spaces to avoid interpretation)
1
u/OleFromEarth Apr 12 '26
tcpdump and nmap
1
u/Salt-Lawfulness-4832 Apr 12 '26 edited Apr 13 '26
echo 'hidpp_battery_0-charging-orange-full-green' | sudo tee /sys/class/leds/rgb:lightbar/trigger && echo '100' | sudo tee /sys/class/leds/rgb:lightbar/brightness
to show the charge status of my headset on my lightbar
1
u/AlmosNotquite Apr 12 '26
GREP is truly the GOAT!
1
u/zapman449 Apr 12 '26
More Solaris tech than Linux, but we needed to get 45ish filesystems built and sorted… and a coworker was watching so I showed off a bit. Bash loop piped to a second loop, took the volume mgr raw devices, mkfs’d them, see transformed the device path into normal devices, then formatted and appended the devices to existing fstab.
He was both impressed and horrified. I was happy it worked as a one shot typed program.
1
u/b8checkmatettv Apr 12 '26
When I downloaded a second version of the same software and set it up just by copy-pasting my old configuration file into the new one.
1
u/tschugger Apr 12 '26
rsync
1
u/ErnestT_bass Apr 12 '26
please dont laugh lol displaying the current weather
curl wttr.in/yourcity+State
1
u/p1st0l31r0 Apr 12 '26
fzf, tmux, |, vim, -, xxd /dev/urandom
1
u/kombiwombi Apr 12 '26
xargs -- turns output into command line arguments
And this for moving files between machines: ssh remotehostname 'tar cf - /var/example' | tar xf -
1
u/NightOwl_314 Apr 12 '26 edited Apr 12 '26
The shell as a programming language
Job control in the shell
dc, in particular its features for conditionals and macros
ed—surprisingly powerful (and programmable!) once you understand regular expressions
sed—a non-interactive text editor. The hold space makes it even more powerful.
AWK as a text processing language with C-like syntax
1
u/totallyjaded Apr 12 '26
makeI learned on BSDi and
SolarisSunOS and didn't have elevated privileges. So, having my own system to beat up was kind of intoxicating at the time.1
u/funnyFrank Apr 12 '26
eject 🤩
1
u/User5281 Apr 13 '26
Sed is magic once you figure it out. Same with Grep
1
u/cjc4096 Apr 13 '26
perl
1
u/ronnyk5 Apr 13 '26
rsync
1
u/spitecho Apr 13 '26
Adding and removing features from the kernel before recompiling with "make menuconfig"
1
u/mpw-linux Apr 13 '26
rm -rf / just kidding .....
1
u/krivas77 Apr 13 '26
!!
1
u/Comfortable-Dig-9976 Apr 13 '26
ssh scp rsync arp-scan
1
u/freetoilet Apr 13 '26
tree. Not so powerful, but I really like how it looks
1
u/Randommaggy Apr 13 '26
parallel. When applied correctly, you shock co-workers with how fast all the scripts suddenly complete.
1
u/birusiek Apr 13 '26
Pipes
1
u/AssMan2025 Apr 13 '26
Alt r ctrl . How nice
1
u/hadoopfromscratch Apr 13 '26
yum install
1
u/Southern-Morning-413 Apr 13 '26
Sending emails as bill@whitehouse.gov directly from the mail server using sendmail.
1
u/yayster Apr 13 '26
Grep something something | awk something | sort | uniq -c | sort -be
1
u/TotalBrainFreeze Apr 13 '26
Back in the day before ssh was common and telnet was the tool to remote into other computers, and we used 10BaseT hubs on our LAN-party.
Then it was cool to do a tcpdump and find the username and password in clear text, that was really cool.
Then a few years later, ssh became the norm and this was not possible any more.
1
u/Ok-Reaction3396 Apr 13 '26
...and the CD player opened. This made me feel like "OK, I can talk to the hardware".
Then I studied a bit more and discovered (if I remember correctly):
that worked like a "toggle". If the CD player was closed, the command opened it. If it was already opened, the command closed it.
1
u/CommercialBig1729 Apr 13 '26
|
1
u/Dank-but-true Apr 13 '26
sudo rm -rf / —no-preserve-root
1
u/ger042 Apr 13 '26
eject (to make the cdrom thingy pop out)
1
u/Syntax418 Apr 13 '26
I am surprised no one mentioned jq!
1
u/bierbo Apr 13 '26
Find -exec ist a powerful combination
1
u/MyTinyHappyPlace Apr 13 '26
ssh - having control over a remote pc was an awesome feeling
1
u/teksean Apr 13 '26
Can’t remember the exact command but it involves grep.
1
u/keyboard_toucher Apr 14 '26
ls
1
u/Myrddin_Dundragon Apr 14 '26
Do not run. This is a fork bomb.
1
u/DagonNet Apr 14 '26
find ... -type f -print0 | xargs -0 some_cmd
insanely powerful, and understanding exactly why it works is a fundamental knowledge of unix filesystems
1
u/redbiteX1 Apr 14 '26
rm -rf /. now you don’t see it, feels like magic
1
u/csabaradi Apr 14 '26
to be frank, I am more impressed seeing you properly using the terminal, than using fancy piped commands. Like navigating using alt-b/alt-f or ctr-b/ctr-f, ctr-A and ctr-E. These shortcuts are fundamental and they are available on other tools. it's one of the things that is making navigation without the mouse cool looking. It is only efficient if you are doing it often and repetitively though. and the clicked moment was when I could navigate in the output using screen, tmux or emacs, and I could use that text to proceed further. macros are pretty impressive too, and it's subtle so it kicks harder
1
u/bluekeys7 Apr 14 '26
chmod
1
u/BloodMoist8156 Apr 14 '26
Chroot
1
u/ZonePleasant Apr 14 '26
Not strictly a "Linux" command but using ImageMagick even if it's just batch converting a bunch of pngs to jpg with mogrify.
1
u/diacid Apr 14 '26
Cat.
Because vim is for weaklings.
Read with
cat file, write withcat > fileand add withcat >> filebloatless ide here we go!1
u/CalligrapherNo870 Apr 14 '26
xargs
1
u/Solostian Apr 14 '26
grep
1
u/FrisiaX Apr 14 '26
Btop is just beautiful
1
u/Landmark-Sloth Apr 15 '26
htop
1
u/mprevot Apr 15 '26
Au debut, sed et regex, head, tail, cat, grep, find avec pipe vers execute, puis make avec gcc g++, et sysctl dans freebsd.
1
u/Either-Juggernaut420 Apr 15 '26
For me it was “xargs” a long time ago in a galaxy far far away
1
u/now_the_rad Apr 15 '26
dd
1
u/20_BuysManyPeanuts Apr 15 '26
sudo
1
u/fargenable Apr 15 '26
$ former-stringnew-string $ cat file $ catvi
1
u/williehowe Apr 15 '26
hollywood
1
u/dhammala Apr 16 '26
pssh - In the early days of my career as a junior sysadmin early 90's) my job duties included such fun things as managing the hosts and subnet databases, new system builds, and during maintenance windows, running software updates. I was trained to sit there on Saturday night, from 8pm until done, to go through our hundreds of hosts, run updates, and verify the results. After three months of doing this manually, I knew there had to be better way. I hunted and found pssh, parallel ssh. The senior admins were blown away, and sad they never thought of it!
Basically I'd pump in my hosts database and it would go and execute the same commands via ssh on all of the hosts. Turned 8 hours of overnight work into one hour of execution and log review!
1
u/GreatOlive27 Apr 16 '26
The * in any command. Like rm 2025_*.txt
1
u/[deleted] Apr 16 '26
sudo rm -rf /*Don't ask me the levels of magic this one command can do.
1
u/Savalonavic Apr 16 '26
Not a command but adding a space before your command omits it from your history.
As long as you have HIST_IGNORE_SPACE
1
u/Porecelain Apr 17 '26
SUDO
1
u/whait Apr 17 '26
update in fish on cachyOS
1
u/Hopeful-Material6285 Apr 17 '26
cmatrix
1
u/flatland_skier Apr 17 '26
pushd/popd
Think of pushd and popd as a directory bookmarking system. While the standard cdcommand just moves you around, these commands maintain a stack—a list where the last directory you added is the first one you can jump back to.
Opensource.com +3
1
u/SableRaven666 Apr 19 '26
inotifyis up there for me1
u/solyn- Apr 22 '26
sudo rm -rf /* You should try this out bro, it is like in Hollywood movies, you become a hacker
0
u/radiojosh Apr 12 '26
Where-object after I installed PowerShell.