O'Reilly logo

Practical Linux by Bill Ball, John Ray, Michael Turner, M. Drew Streib

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required