Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Manage Hard Drives on macOS: Discover How to Use Disk Utility and Terminal

Managing hard drives on macOS involves understanding how to use both the graphical interface provided by Disk Utility and the command-line tool, Terminal. This guide will walk you through the essentials of managing hard drives, including formatting, partitioning, and checking the status of your drives.

Using Disk Utility

Disk Utility is a built-in macOS application that provides a user-friendly interface for managing disks and volumes. Here's how to perform some basic tasks:

  1. Open Disk Utility:

    • Go to Applications > Utilities > Disk Utility.
  2. Format a Drive:

    • Select the drive you want to format from the sidebar.
    • Click on the "Erase" button.
    • Choose a format (e.g., APFS, Mac OS Extended).
    • Name your drive and click "Erase" to format it.
  3. Partition a Drive:

    • Select the drive you want to partition.
    • Click on the "Partition" button.
    • Click the "+" button to add a new partition.
    • Adjust the size and format of the new partition.
    • Click "Apply" to create the partition.

Using Terminal

For more advanced users, Terminal provides powerful command-line tools to manage hard drives.

List All Drives

To list all connected drives, use the following command:

diskutil list

Format a Drive

To format a drive using Terminal, use the diskutil command. Replace /dev/diskX with your actual disk identifier:

diskutil eraseDisk JHFS+ NewVolumeName /dev/diskX

Check Drive Status

To verify the status of a drive, you can use:

diskutil info /dev/diskX

This command provides detailed information about the specified drive.

Repair a Drive

To repair a drive, use the following command:

diskutil repairDisk /dev/diskX

This attempts to repair any issues with the specified disk.

Examples

Example 1: Formatting a USB Drive

Suppose you have a USB drive that you want to format to Mac OS Extended. First, identify the disk using diskutil list, then format it:

diskutil list
diskutil eraseDisk JHFS+ MyUSB /dev/disk2

Example 2: Partitioning a Drive

Let's say you want to add a partition to your main drive:

  1. Open Disk Utility.
  2. Select your main drive.
  3. Click "Partition" and add a new partition.
  4. Set the size and format, then apply.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.