• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

eject: command not found

by Deepika

eject Command ejects removable media such as a CD, DVD, floppy, or tape. You may name the device by its /dev or /mnt filename. The /dev and /mnt prefixes are optional for any items in the /dev and /mnt directories. If no device is named, it is assumed that “cdrom” should be ejected.

Syntax:

eject [options] [device]
Note: Only devices that support eject under program control respond to this command.

If you encounter the below error while running the command eject:

eject: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install eject
Ubuntu apt-get install eject
Alpine apk add util-linux
Arch Linux pacman -S util-linux
Kali Linux apt-get install eject
CentOS yum install eject
Fedora dnf install util-linux
OS X brew install eject
Raspbian apt-get install eject

eject Command Examples

1. Display the default device:

# eject -d

2. Eject the default device:

# eject

3. Eject a specific device (the default order is cd-rom, scsi, floppy and tape):

# eject /dev/cdrom

4. Toggle whether a device’s tray is open or closed:

# eject -T /dev/cdrom

5. Eject a cd drive:

# eject -r /dev/cdrom

6. Eject a floppy drive:

# eject -f /mnt/floppy

7. Eject a tape drive:

# eject -q /mnt/tape

Filed Under: Linux

Some more articles you might also be interested in …

  1. userdel: command not found
  2. Ubuntu Linux – OpenShot Video Editor
  3. How to change the default location (/var/cache/yum) of yum cache
  4. ctr: command not found
  5. RHEL 7 – RHCSA Notes – System documentation including man, info, and files in /usr/share/doc
  6. How to install an RPM package into a different directory in CentOS/RHEL/Fedora
  7. imagemagick for image optimization
  8. chrt : command not found
  9. How to Verify if a Disk/Partition is in Use by Oracle ASM, was used by Oracle ASM or is never used by Oracle ASM
  10. How to make alias command work in bash script or bashrc file

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright