Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What will this command do when run from shell prompt?

user-image
Question added by Jerzy Ferenc , Senior Systems Engineer , AdRem Software sp. z o.o.
Date Posted: 2017/08/08
Deepak Thapa
by Deepak Thapa , Sr. Associate , Cognizant Technology Solutions

This piece of code is called a fork bomb. Like a virus, it will continually multiply and subdivide itself, asking for more and more resources from the computer, until the entire computer is trying to process this code.

fork: retry: Resource temporarily unavailable

As a result, the computer has no resources left for any other programs or processes, and will freeze or crash. Fortunately, rebooting your computer should cure it.

Abhishek Jha
by Abhishek Jha , Oracle DBA , IBM INDI PVT. LTD

Its called fork bomb, It is a bash function which calls itself twice and so on. You might have to reset your computer to get out of it.

Amir Jaffri
by Amir Jaffri , Resident Engineer , Netapp Corporation

It will create a loop runing a command within itself until it fills up the system memory and leave computer unusable.

it will consume all the resources

anand patel
by anand patel , Technical Lead , HCL Technologies Limited

it acquires all the resurces of the Server to maximum.

Renuka Palanisamy
by Renuka Palanisamy , Associate System Engineer , IBM

"lag so badly".

Please do not run this command in your system for testing purpose.

Otherwise It will be force rebooting your system.

Saurabh Dubey
by Saurabh Dubey , Senior Software Engineer Analyst , Accenture services pvt. ltd.

This command will keep on running in loop till all the resources of the system is being consumed.

Derivation of the command:

':()' function is defined with name ':'

'{:|:& }' Run that function :() on loop , feed output ':' value to ':'  again and run it on background '&'.

';' command seperator.

':' Call function again. 

Rajeshkumar Jayaraman
by Rajeshkumar Jayaraman , Senior System Engineer/ Senior ETL Analyst/Designer , AMERICAS Hedge Fund

Not to try this command for curiosity

More Questions Like This