• 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. Rpm: Error While Loading Shared Libraries: Libz.so.1: Cannot Open Shared Object File: No Such File
  2. apparmor_status: command not found
  3. Audit Rule Configuration not Reflected – How to troubleshoot
  4. resolvectl: command not found
  5. poweroff Command Examples in Linux
  6. How to create snapshot of LVM thin volumes using snapper command
  7. qsub Command Examples in Linux
  8. module: command not found
  9. rpc.statd[PID]: Failed to create listener xprt (statd, 1, udp6) – CentOS/RHEL 6, 7
  10. CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode

You May Also Like

Primary Sidebar

Recent Posts

  • “az storage blob” Command Examples (Manage blob storage containers and objects in Azure)
  • “az storage account” Command Examples (Manage storage accounts in Azure)
  • “az sshkey” Command Examples (Manage ssh public keys with virtual machines)
  • “az redis” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright