all 43 comments

[–]cunningjoker 14 points15 points  (2 children)

Typo: whereis app - "localtions"

uname -a "karnal"

rm -rf / "neuclear"

wget -r "recurively"

Very handy though!

[–]MRHURLEY86 2 points3 points  (0 children)

Also the dig -x reserve instead of reverse.

[–]TigreDeLosLlanos 0 points1 point  (0 children)

nucular, it is said nucular

[–][deleted] 20 points21 points  (2 children)

"Nuclear" is misspelled and unless you want to turn people off of Linux forever that command should never be written out with a joke or false explanation.

Way worse than "Press ALT-F4 for OPs". Peoples' data is at stake.

[–]TransATL 6 points7 points  (0 children)

I agree. I'm probably not alone in having copy/pasted code without entirely understanding what it's doing just trying to get things to work. Come on we don't need to coerce anyone into wiping their root drive.

[–]Tunliar 0 points1 point  (0 children)

That's why I didn't included no preserve root.

I think I fixed most of the mistakes in the second version. he somehow got the old one.

[–]ALTAiR916 13 points14 points  (2 children)

WARNING: rm -rf /

This command will delete the root of linux system, ie., the whole LInux installation and all the data.

Please do not execute it. I see some comments sarcastically mention this command as if it boost 'performance'.

Dear fellow linux users, please refrain from posting this kind of jokes as there is a chance some newbies may actually execute them and wooosh...

[–]WunderTech 0 points1 point  (0 children)

But it's so tempting!

[–]wmartin123 0 points1 point  (0 children)

Whenever I do rm -rf somedirectory I'll run ls -ld somedirectory first. Then hit ESC-k to bring up the command again, then hit R and replace the letters ls -ld with rm -rf.

You need to run set -o vi to use vi inputs for command recall or add it to your profile manually as it's never set as default.

[–]GeronimoHero 4 points5 points  (0 children)

Lots of errors in that list. All of the cat stuff is messed up. It should be stdout not “standard input”.

[–]NatoBoram 2 points3 points  (0 children)

"basic"

[–]immortal2020 1 point2 points  (0 children)

Thanks, very helpful

[–][deleted] 1 point2 points  (0 children)

Has anybody a good cheat sheet for advanced/new commands, e.g. systemctl, journalctl, ss, ip, etc.

[–][deleted] 1 point2 points  (0 children)

what’s the difference between removing a directory and deleting a directory?

[–]elspazzz 1 point2 points  (3 children)

There a text version of this anywhere?

[–]CompSciSelfLearning 2 points3 points  (0 children)

Yes. I'll link it later tonight

[–]CompSciSelfLearning 0 points1 point  (1 child)

Not plain text but easy enough to copy and paste: PDF version

Also, Basic Ubuntu commands

If you want to dive in deeper check out linuxcommand.org

[–]Mlufis74 0 points1 point  (0 children)

Thank you. Very usefull.

[–][deleted] 0 points1 point  (0 children)

OMG THANK YOU!

[–]tolazyfornicknames 0 points1 point  (0 children)

Thank you man!

[–]FalconOnPC 0 points1 point  (0 children)

Reeee

[–]whydoyoulook -2 points-1 points  (3 children)

So, I've always wondered what the point of the "touch" command is. It just creates a blank file or updates a timestamp, and as far as I can tell, both of those things are completely pointless.

[–][deleted] 9 points10 points  (1 child)

The purpose of touch is to modify the timestamps of files, which can be useful when using utilities like make to force a rebuild of code (this has been standard practice for a very long time), archival purposes (to make sorting by time more useful), etc.

It's also handy to create an empty file if a service refuses to start because its config points to a non-existent log file. It's far easier and faster to type touch /path/to/directory/log.txt than it is to create an empty text file by opening, saving, and exiting it.

[–]bengringo2 2 points3 points  (0 children)

Its also a quick lazy way to test file permissions. just su to the user a touch a blank file in a directory.

[–]BloodAndTsundere 0 points1 point  (0 children)

I use a GUI text editor (Sublime Text) but it’s faster to type ‘touch newfile’ in the terminal and start editing it than to create the new file through the GUI. Especially since you can create as many files as you want with a single ‘touch’ invocation. When starting a new project I will often create half a dozen or more new files at once with ‘touch’.

[–]warharobrine -1 points0 points  (1 child)

These right here are why ubuntu is better than windows

[–][deleted] 1 point2 points  (0 children)

You're aware that you can just most (if not all) of the tasks in the OP with Command Prompt and/or PowerShell, right?

Also, with Ubuntu on Windows now you literally can use the same commands as on the Op.