Mounting USB disks (pmount)

This recipe installs and applies pmount, a command that mounts USB disks attached directly to the Raspberry Pi in the same manner as the desktop file manager.

If a disk is connected to the Raspberry Pi via a USB port when using the Raspberry Pi's graphical user interface (GUI), the desktop file manager will ask the user's permission to mount the disk. However, when using a Raspberry Pi remotely (or when the Raspberry Pi has been booted in text mode), there is no GUI to ask if a file should be mounted.

This recipe does not rely on the Raspberry Pi GUI or the desktop file manager to mount a disk. Instead, the command-line utility pmount is used to mount a USB drive in the same way that the GUI would—in the /media directory. ...

Get Raspberry Pi Networking Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.