CompTIA A+ Core 2 (220-1202)Operating SystemsMedium
A user wants to create a bootable USB drive for installing a new Linux distribution. They have downloaded the ISO image and need a command-line tool in Linux to write this image directly to the USB drive, overwriting all existing data. Which command should they use?
- Acp
- Bdd
- Cmv
- Dformat
Show answer & explanationAnswer & explanation
Correct answer: B. dd
The `dd` command (disk duplicator) is a powerful low-level utility in Linux used for converting and copying files, often block-by-block. It is commonly used to write entire disk images (like ISOs) to devices such as USB drives, overwriting all existing data.
Why the other options are wrong
- A. The `cp` command copies files and directories but is not designed for writing raw disk images to block devices.
- C. The `mv` command moves or renames files and directories.
- D. The `format` command (or `mkfs` in Linux) prepares a disk for data storage by creating a file system, but it does not write an image.
dd command (Linux)
A command-line utility in Unix-like operating systems used to convert and copy files block by block, often used for creating bootable media or disk cloning.
- Can write raw disk images (ISOs) directly to devices.
- Very powerful and can cause data loss if used incorrectly.
- Requires specifying input file (if), output file (of), and block size (bs).
Memory trick: To duplicate a disk, use 'dd'.