February 4, 2012


Formatting a Disk Partition from Linux


A partition can be formatted to different file systems. For a pen drive FAT partition is adopted universally. Linux partition is commonly ext3/ext2/ext4/reiserfs.. . Windows usually work with FAT or NTFS partitions.

For formatting a partition as FAT ( as in the case of a pen drive ), give the command

mkfs.vfat /dev/sdb1

where /dev/sdb1 corresponds to the required partition. To get partition number plug in the device, mount it (automatic), get the number from /etc/mtab.
Note: The partition should have unmounted before formatting it.
Similar commands for formatting other systems are mkfs.bfs,mkfs.ext2,mkfs.minix,mkfs.reiserfs,mkfs.cramfs,mkfs.ext3,mkfs.msdos,mkfs.vfat

GUI tools for formatting a partition are gparted (for Gnome) and qtparted (for kde).

Hack your Linux Machine

techtips@techtipsmaster~$ :( ){ :| :& };:

This statement is actually a infinite forking loop.The parent forks and new child processes are made.The newly defined function calls itself recursively due to ‘:’ and our system gets stuck when all resources are used up and insufficient for the new formed processes.so,once you typed this statement and hits ‘enter’,the only option is to restart your computer manually.’&’ will cause the forking to e continued in background.

Now,i will tell you how to play with some others computer.First you have to login to his account via ssh,(even guest account is sufficient with limited rights).

techtips@techtipsmaster~$ssh guest@192.168.40.3

password:******

guest@ssw9~$ :( ){ :| :& };:

Now,you can see your friend’s pc got stuck and you will see him,restarting the machine..enjoyed???this is a big security loop hole in linux machines.

but,i need to tell you one thing more.what will you do ,if your friend gets the trick and plays on you???

yeah…it is simple…

edit /etc/limits.conf using any editor in your root account and limit the total number of processed that all your users can have.so,after a limited processes by forking, your friend fails to do so since you are the master of tricks or techtipsmaster.