Rate Thread
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Never type this stuff into your computer
#1
....Unless you know what you're doing. This example will apply to linux distros (and MacOS) (although there's plenty of stuff for Windows so don't worry).

Part of the problem with linux is a lot of instructions for linux involve the terminal (command line) and a lot of novice users will copy/paste commands into the terminal without understanding what the command really does.

The more popular dirty trick is this...

Code:
sudo rm -rf /*

Running this command will erase everything off the computer, including any mount points so this would erase data in other places.

sudo is short for super user do, this is a security mechanism to prevent commands that need elevated privileges from running, sudo requires the user to enter the supervisor password or a user account that has sudo access.

rm is the remove command, the -r means recursive, meaning that rm will drill into sub folders. The -f means to remove by force, such as read only files or locked files. Finally / is the "root" directory. The filesystem structure in linux is much different than windows, / can include all hard disks, network shares, devices, etc, that are present on the computer. Lastly the * is what makes this command particularly destructive. The asterisk is a wildcard, having it by itself will match everything, since it matches everything and we're recursing through the filesystem everything will get erased.

However, if that command isn't evil enough this command is it's more sinister brother...

Code:
sudo dd if=/dev/urandom of=/dev/sda bs=1M

DD has been coined the term "disk destroyer" and for good reason. Not understanding how DD works can...well destroy everything on your hard drive. However, dd has very useful purposes such as making an exact backup of your hard drive in this example:

Code:
sudo dd if=/dev/sda of=/dev/sdb

The "if" means input file and "of" is output file. The urandom in the above example is a pseudo device present in linux that creates random data. So you guessed, it running the above command will write random data to the hard disk sda. This can be useful if you're wanting to erase the contents of the hard drive but often we're not wanting to do that. The second command will copy the hard drive sda to sdb.

The bottom line is if you're new to linux and following tutorials don't blindly copy and paste stuff in to the terminal. Looks up what the commands do first. Yes, a lot of tutorials and blogs aren't nefarious but you can never be sure. Also make sure that if you are following a guide that it is written recently, sometimes things change, programs get depreciated and so forth.

In Windows 10, Microsoft has PowerShell which is more or less the equivalent of the Linux Terminal in Windows, so much of the same "power" exists in PowerShell that exists in the Linux terminal, so you also have to watch out there are well although most of the commands in PowerShell are more spelled out in my opinion.
"I’m not expecting to grow flowers in a desert, but I can live and breathe and see the sun in wintertime"
Check out my stuff!
Reply



Messages In This Thread
Never type this stuff into your computer - by InbetweenDreams - 02-26-2021, 02:24 PM

Related Threads…
Thread Author Replies Views Last Post
  Terrible Computer Products InbetweenDreams 5 1,799 06-01-2020, 01:08 AM
Last Post: InbetweenDreams
  Eye Relief for Computer Screen Display - f.lux add-on palbert 1 1,146 09-29-2014, 11:03 PM
Last Post: ChadCoxRox

Forum Jump:


Recently Browsing
1 Guest(s)

© 2002-2024 GaySpeak.com