How to destroy linux

5 Deadly Linux commands that can Destroy one System

5 deadly linux commands that can destroy your System

Here are 5 ways to destroy your system, learn and avoid 🙂

deadly linux commands #1: Delete Everything

Explanation : It is a combination of three keywords.
First is : rm – It will remove all the files followed by this
command.
Second is : -rf This will run rm command in more effective
way and will remove everything ( all files and folders
inside the specified folder )without asking confirmation
from the user.
Third is : / – This will start removing the data from the root
directroy and will delete everything from the computer
including the data of removable media.

deadly linux commands #2: Shell function that gets replicated.

This command creates a shell function , which once get
initialized starts to create multiple copies of itself.It results
in taking quickly all the memory and power of CPU.It
makes computer freeze or not responding. This is also
known as Denial Of Service Attack.

deadly linux commands #3: format the hard disk.

Explanation : This command is again composed of two
keywords.
First is : mkfs.ext4 – This part of command will create a new ext4 file system on following device where this command will get executed.
Second is : /dev/sda1 – This part of command specifies the 1st partition on the first hard disk which is probably in use by the user.
Similarly, This Command:

will Format the second partition on the second hard disk with ext3 File system.

deadly linux commands #4: Writes Any content Directly to a Hard Drive.

Explanation : This command will execute normally as other
commands in linux do. But output of this command will
directly be sent to the file system (NTFS or FAT ) of the
Hard Drive. It will result into damaging the file system of
the computer.

deadly linux commands #5: Beware it Will Move your Home Directory To Black hole.

Explanation : Moving any of your content and data to
following path : /dev/null means you want to destroy it.
It means /dev/null is a black hole where once anything
sent , can not be recovered back.
Note:Many of these commands will only be dangerous if
they’re prefixed with sudo on Ubuntu – they won’t work
otherwise. On other Linux distributions, most commands
must be run as root.

Источник

Hackaday

The G1 ‘execute every command you type‘ bug naturally spawned ‘rm -rf /’ jokes. rm is the Linux command for deleting files. The -r and -f flags will cause it to remove files recursively and ignore confirmation. Executed as root it will annihilate the entire filesystem. Won’t it? [Jon Hohle] decided to test exactly how destructive the command was to *nix systems. How functional would the system be afterwards? He tested it side by side with the Windows equivalent, both ‘format c:’ and ‘del /F /S /Q’. He wanted to see what protections were available and what would be left working. Linux ended up completely broken while Windows, thanks to file locking, actually shutdown cleanly… and never came back. Some OSes, like Solaris, refuse to run the command ‘rm -rf /’ to prevent accidents.

29 thoughts on “ How To Destroy A Filesystem ”

i did that in operating systems unix2 at my college

so much fun watching stuff crash and burn lol

Strange, I tried to format the system drive on a windows machine that I was decommissioning one time and I seem to remember windows refusing to allow it to run, even under an administrator account… this was under NT 4.0 I think?

I tried this on my Ubuntu system (I was going to do a reformat upgrade to 8.10 anyways, so I decided to have fun with my existing install) and it deleted a lot of stuff (first my desktop icons, then my background, then other stuff) but it never completely destroyed the system. I was quite sad, I thought it’d be a nuclear meltdown and instead just a few user files deleted.

Читайте также:  Скрипт создать папку windows

Kinda reminds me of messing with department stores by typing format C: /autotest
I don’t know that autotest still works though.. last time I tried it was on win98 🙂

The solaris story mentions, that they got standards changed. Now I’m really tempted to check if my systems are compliant… Must no!@#$% CONNECTION LOST

On NT it might have told you that you must unmount the filesystem first. I myself was surprised by that very unix-sounding error message.

Looks like the webmaster tried it himself, the page is down 🙂

Unfortunately formatting the system drive doesn’t work on any version of Windows 🙁

To be honest it really is shocking that other OS’s haven’t implemented proper compulsory file locking, since it adds quite a lot to the reliability of a system if it’s binaries can’t be patched/overwritten/upgraded while they’re executing.

“I tried this on my Ubuntu system … just a few user files deleted.”

Sounds like you forgot to do “sudo rm -rf /”.

Since when is “rm -rf /” equivalent to formatting a drive?

dd if=/dev/zero of=/dev/sda

We once got someone to try cat /dev/mouse > /dev/hda

He swore to kill us, but he hasn’t done it… yet.

newer versions of Solaris may refuse, but SunOS 4 would cheerfully execute rm -rf / – DAMHIKT (yes, you can do it accidentally, if your typing is sufficiently bad).

I actually did this once, completely on purpose (ubuntu), meaning to mount and cp another filesystem in.. turns out mount and cp were both deleted, game over.

Got it back up and running from a livecd though.

I once fell from my chair and right onto the return button while typing an rm-command, and sadly it said “/” at the time of my mishap. but lucily, my old iBook was so incredible slow at deleting (encrypted filesystem and two digit load average :D), that it barely emptied /bin.
thankfully, the shell was still in memory (although deleted from disk), so I could copy the essential files from another computer.

What struck me as odd was, though, that dpkg/apt-get does not seem to have any kind of “repair”-functionality, that looks through the installed packages file lists, and in case of missing files/wrong checksums for binaries etc, does a reinstall. I had to figure out the broken packages manually, and dpkg -r –force them away, only to reinstall them again.

issackelly deleted his mount and cp?
i guess he can just go to 4chan and get more.

As soon as it nukes sync, you’re done. So while destructive, it won’t take out the whole file system.

Why don’t you have a seat right over here?

rm -rf dosen’t work. You have to use rm -rf –no-preserve-root / 😉

The windows equivalent would be rmdir not del, del as is shown stops dead on locked files.
I wonder how many decades it will take before people will get familiar with rmdir, and other ‘new’ commands introduced after win98..

find / -iname * -exec cat /dev/mem \> <> ;

try this as root

caches files in ram for faster access

Is this such a big surprise? When you delete important shit, other important shit dies….

Sure, OS’s such as Windows have protections against it, but for Linux/Unix/BSD its just a way to cull the idiots…

Hardly hackaday.com quality… Hell, hardly digg.com quality.

Linux (and presumably other Unicies) load their binaries to memory on execute, so it doesn’t matter if they’re deleted. Also, files aren’t actually unlinked until all handles to them are closed.

using fdisk to delete the partition may not be a single command but you can run it on a windows system drive without any problems

How exactly does that destroy a filesystem? It’s ext-3 (or whatever) before and after. It might destroy your OS, tho.

This article is full of fail.

Читайте также:  Как поставить windows с flash

Who the hell approves this shit? if anything.. it’s proof you’re all either Windows users or Ubuntu zealots.

“Linux would not continue with the command until the root password was entered.”

Wrong. You don’t enter your root password, you enter your users password.

Deleting all the files in ones C:\ drive is not the equivalent of rm -rf / under Unix, for one, multiple drives are mounted under / on Unix.

Anyway, notta-hack god dammit! ban these idiots from posting stupid stories already!

Yeah this isn’t exactly a “hack” it reminds me when I trashed the “macintosh hard drive” on an old school machine running like 5.0 mac os or something and a stupid security program that all you had to do was unclick “guard” in control panels. Boy the computer did not like that. It was funny seeing the computer person trying to fix it. All that would show up was the infamous bomb logo in the white box.

what i want to know is which system was easier to restore back to normal. Not reinstal, but repair. I’m betting the linux one could be easily repaired via a live-cd.

would this work on an iphone.
if not what sort of command does Darwin accept to make it crash?? 😀
Would like to see the effect on an iphone 😛

Leave a Reply Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Источник

How to Remove Linux and Install Windows on Your Computer

For a Microsoft Windows XP version of this article, see 314458.

Summary

This article describes how you can remove the Linux operating system from your computer, and install a Windows operating system. This article also assumes that Linux is already installed on the hard disk using Linux native and Linux swap partitions, which are incompatible with the Windows operating system, and that there is no free space left on the drive.

Windows and Linux can coexist on the same computer. For additional information, refer to your Linux documentation.

More Information

To install Windows on a system that has Linux installed when you want to remove Linux, you must manually delete the partitions used by the Linux operating system. The Windows-compatible partition can be created automatically during the installation of the Windows operating system.

IMPORTANT: Before you follow the steps in this article, verify that you have a bootable disk or bootable CD-ROM for the Linux operating system, because this process completely removes the Linux operating system installed on your computer. If you intend to restore the Linux operating system at a later date, verify that you also have a good backup of all the information stored on your computer. Also, you must have a full release version of the Windows operating system you want to install.

Linux file systems use a «superblock» at the beginning of a disk partition to identify the basic size, shape, and condition of the file system.

The Linux operating system is generally installed on partition type 83 (Linux native) or 82 (Linux swap). The Linux boot manager (LILO) can be configured to start from:

The hard disk Master Boot Record (MBR).

The root folder of the Linux partition.

The Fdisk tool included with Linux can be used to delete the partitions. (There are other utilities that work just as well, such as Fdisk from MS-DOS 5.0 and later, or you can delete the partitions during the installation process.) To remove Linux from your computer and install Windows:

Remove native, swap, and boot partitions used by Linux:

Start your computer with the Linux setup floppy disk, type fdisk at the command prompt, and then press ENTER.

NOTE: For help using the Fdisk tool, type m at the command prompt, and then press ENTER.

Type p at the command prompt, and then press ENTER to display partition information. The first item listed is hard disk 1, partition 1 information, and the second item listed is hard disk 1, partition 2 information.

Читайте также:  Перейти графический режим linux

Type d at the command prompt, and then press ENTER. You are then prompted for the partition number you want to delete. Type 1, and then press ENTER to delete partition number 1. Repeat this step until all the partitions have been deleted.

Type w, and then press ENTER to write this information to the partition table. Some error messages may be generated as information is written to the partition table, but they should not be significant at this point because the next step is to restart the computer and then install the new operating system.

Type q at the command prompt, and then press ENTER to quit the Fdisk tool.

Insert either a bootable floppy disk or a bootable CD-ROM for the Windows operating system on your computer, and then press CTRL+ALT+DELETE to restart your computer.

Install Windows. Follow the installation instructions for the Windows operating system you want to install on your computer. The installation process assists you with creating the appropriate partitions on your computer.

Examples of Linux Partition Tables

Single SCSI drive

Multiple SCSI drives

Single IDE drive

Multiple IDE drives

Also, Linux recognizes more than forty different partition types, such as:

FAT 16 > 32 M Primary (Type 06)

FAT 16 Extended (Type 05)

FAT 32 w/o LBA Primary (Type 0b)

FAT 32 w/LBA Primary (Type 0c)

FAT 16 w/LBA (Type 0e)

FAT 16 w/LBA Extended (Type 0f)

Note that there are other ways to remove the Linux operating system and install Windows than the one mentioned above. The preceding method is used in this article because the Linux operating system is already functioning and there is no more room on the hard disk. There are methods of changing partition sizes with software. Microsoft does not support Windows installed on partitions manipulated in this manner.

Another method of removing an operating system from the hard disk and installing a different operating system is to use an MS-DOS version 5.0 or later boot disk, a Windows 95 Startup disk, or a Windows 98 Startup disk that contains the Fdisk utility. Run the Fdisk utility. If you have multiple drives, there are 5 choices; use option 5 to select the hard disk that has the partition to be deleted. After that, or if you have only one hard disk, choose option 3 («Delete partition or logical DOS drive»), and then choose option 4 («Delete non-DOS partition»). You should then see the non-DOS partitions you want to delete. Typically, the Linux operating system has two non-DOS partitions, but there may be more. After you delete one partition, use the same steps to delete any other appropriate non-DOS partitions.

After the partitions are deleted, you can create partitions and install the operating system you want. You can only create one primary partition and an extended partition with multiple logical drives by using Fdisk from MS-DOS version 5.0 and later, Windows 95, and Windows 98. The maximum FAT16 primary partition size is 2 gigabytes (GB). The largest FAT16 logical drive size is 2 GB. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

105074 MS-DOS 6.2 Partitioning Questions and Answers
If you are installing Windows NT 4.0 or Windows 2000, the Linux partitions can be removed and new partitions created and formatted with the appropriate file system type during the installation process. Windows allows you to create more than one primary partition. The largest partition that Windows NT 4.0 allows you to create during installation is 4 GB because of the limitations of the FAT16 file system during installation. Also, the 4-GB partitions use 64-KB cluster sizes. MS-DOS 6.x and Windows 95 or Windows 98 do not recognize 64-KB cluster file systems, so this file system is usually converted to NTFS during installation. Windows 2000, unlike Windows NT 4.0, recognizes the FAT32 file system. During the installation of Windows 2000, you can create a very large FAT32 drive. The FAT32 drive can be converted to NTFS after the installation has completed if appropriate.

Источник

Оцените статью