Archive for July, 2010

Fork Bomb !!!!!

Just try this on your linux machine at your own risk….

# :(){ :|: & };:

It’s actually a shell function, look closely and it’s an unnamed function

:() with the body enclosed in {}.

The statement ‘:|:’ makes a call to the function itself and pipes the output to another function call—thus we are calling the function twice.

& puts all processes in the background and hence you can’t kill any process. Finally ‘;’ completes the function definition and the last ‘:’ initiates a call to this unnamed function. So it recursively creates processes and eventually your system will hang. This is one of the most dangerous Linux commands and may cause your computer to crash!
Remedy: How to avoid a fork bomb? Of course, by limiting the process limit; you need to edit /etc/security/limits.conf. Edit the variable nproc to user_name hard nproc 100. You require root privileges to modify this file.


You can install any linux straight from the iso image rather than burning it into a CD/DVD and then installing.. This is how you do this

Before starting, There are mainly two things needed to install an -inx flavoured os . one is a kernal (will be vmlinuz in case of ubuntu) and another is a RAM disk or initial root file system (initrd.gz in the case of ubuntu)

Step 1:  Download the iso file from website and store the image file in a    directory

# mkdir ubuntu

#  cp <image file which youhave downloaded> ubuntu

Step 2: Extract the kernal file and RAM disk file from the iso image and store in the directory. You can use any archive manager present in the os. Better use File Roller. These file will be in the /casper/ directory.

Step 3: Add an entry to your grub i.e. in the file /boot/grub/menu.lst

title Ubuntu Install
root (hd4,0)  //Here replace hd4 with your hard disk partition
kernel /ubuntu/vmlinuz
initrd /ubuntu/initrd.img

Step 4: Save and Reboot. The option for installing will come on your grub. And
When You start installing you have to select the source as Hard Disk.