Linux eject command

Linux 命令大全Linux Command Collection

The Linux eject command is used to eject removable devices.

If the device is already mounted, eject will first unmount the device and then eject it.

Syntax

eject [-dfhnqrstv][-a <开关>][-c <光驱编号>][设备]

Parameter Description:

  • [Device] The device can be a driver name or a mount point.
  • -a<switch> or --auto<switch> Controls the auto-eject function of the device.
  • -c<CD-ROM number> or --changerslut<CD-ROM number> Selects the CD-ROM in the CD-ROM changer.
  • -d or --default Displays the default device instead of actually performing the action.
  • -f or --floppy Ejects a removable disk.
  • -h or --help Displays help.
  • -n or --noop Displays the specified device.
  • -q or --tape Ejects a tape.
  • -r or --cdrom Ejects a CD-ROM.
  • -s or --scsi Ejects the device using SCSI commands.
  • -t or --trayclose Closes the CD-ROM tray.
  • -v or --verbose Displays detailed descriptions when executing.

Examples

# eject //不加参数默认弹出
# eject -r /dev/cdrom //指定设备

Linux 命令大全Linux Command Collection

Other Extensions