System Administration Guide: Devices and File Systems

ProcedureHow to Eject Removable Media

  1. Ensure that the media is not being used.

    Remember, media is “being used” if a shell or an application is accessing any of its files or directories. If you are not sure whether you have found all users of a DVD (for example, a shell hidden behind a desktop tool might be accessing it), use the fuser command. See How to Determine If Removable Media Is Still in Use.

  2. Eject the media.

    # eject media

    For example, for a DVD, you would do the following:

    # eject cdrom

    For example, for a USB memory stick, you would do the following:

    # eject rmdisk0

    Tip –

    You can view the removable device name with the eject -l command.