Mounting a Hard Drive or Other Device

After partitioning and formatting a new drive, you must mount the drive. To mount a new drive, you must have a mount point, know the drive's file system type, and know the drive's device name.

Mounting a newly partitioned and formatted drive

  1. Log in as the root operator. Use mkdir to create a mount point for the new drive, like this:

    # mkdir /mnt/zipext2
    
  2. Use the mount command, and specify the type of file system using the -t option, the device name, and the mount point:

    # mount -t ext2 /dev/sda4 /mnt/zipext2
    
  3. Use the df command to verify that the new drive has been mounted:

     # df File system 1024-blocks Used Available Capacity Mounted on /dev/hda6 1443464 1011187 357689 74% / /dev/sda4 95167 13 90240 0% /mnt/zipext2 ...

Get Practical Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.