laallstar.blogg.se

Kali linux mac terminal commands
Kali linux mac terminal commands









kali linux mac terminal commands

The Lesson: As above, beware running commands that involve hard disk devices beginning with /dev/sd. dev/sda - Write the output of the command directly to the hard disk device. > - Send the output of the command to the following location. The command > /dev/sda line works similarly - it runs a command and sends the output of that command directly to your first hard drive, writing the data directly to the hard disk drive and damaging your file system.Ĭommand - Run a command (can be any command.) command > /dev/sda - Writes Directly to a Hard Drive

kali linux mac terminal commands

The Lesson: Beware running commands directly on hard disk devices that begin with /dev/sd. 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. Taken together, this command can be equivalent to running format c: on Windows - it will wipe the files on your first partition and replace them with a new file system. dev/sda1 - Specifies the first partition on the first hard drive, which is probably in use. Mkfs.ext4 - Create a new ext4 file system on the following device. The mkfs.ext4 /dev/sda1 command is simple to understand: Image Credit: Dake on Wikimedia Commons mkfs.ext4 /dev/sda1 - Formats a Hard Drive

kali linux mac terminal commands

The Lesson: Bash functions are powerful, even very short ones.

kali linux mac terminal commands

This is the hex version of rm –rf / - executing this command would wipe out your files just as if you had run rm –rf /. Here’s another snippet of code that’s all over the web:Ĭhar esp _attribute_ ((section(“.text”))) /* e.s.p * would delete all your configuration files. Linux will happily obey this command and delete everything without prompting you, so be careful when using it! The rm command can also be used in other dangerous ways - rm –rf ~ would delete all files in your home folder, while rm -rf. Tells rm to start at the root directory, which contains all the files on your computer and all mounted media devices, including remote file shares and removable drives. rf - Run rm recursively (delete all files and folders inside the specified folder) and force-remove all files without prompting you. This command is more understandable if it’s broken down: The command rm -rf / deletes everything it possibly can, including files on your hard drive and files on connected removable media devices.











Kali linux mac terminal commands