18 Selected Super-Useful Linux One-Liners

Functional, Practical, and some also extremely Dangerous

Kesk -*-
CodeX

--

Photo by Towfiqu barbhuiya

In this post, I compile a series of commands demonstrating how powerful it is to use the Linux bash shell.

Be careful when running some of them because you could lose all your data. However, others will be very handy to you for increasing your productivity. Let’s start.

Dangerous commands

Only execute them if you are sure of what you are doing

I have added at the beginning and at the end of the command the word “- -” so that you cannot copy and paste it.

1. Fork Bomb

This “command,” if you run it on your PC, may not be very dangerous, but if you run it on a server, you can cause a denial of service and leave it without service.

It looks like a series of strange symbols, but it is not. Instead, it is the definition of a bash function.

Bash allows the symbol “:” as the name of a function. And what we do when we execute the command “:(){ :|:& };::” is to create the function called “:.”

Inside the function, it calls itself, and the output redirects it with | to the function “:,” that is, to itself…

--

--

Kesk -*-
CodeX
Writer for

Software engineer - software Enthusiast - Sci-Fi writer.