eject command not found

In this troubleshooting guide we learn how to fix eject command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

eject: command not found

or when using sudo you get the following error message

sudo: eject: command not found

Solutions to eject: command not found

How To Fix eject: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu eject is provided by eject package.

eject is:

This program will eject CD-ROMs (assuming your drive supports the CDROMEJECT ioctl). It also allows setting the autoeject feature.

On supported ATAPI/IDE multi-disc CD-ROM changers, it allows changing the active disc.

You can also use eject to properly disconnect external mass-storage devices like digital cameras or portable music players.

To fix this problem, we can install more using the command below.

sudo apt-get -y install eject

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install eject.

sudo apt -y install eject

Or if you have aptitude installed you can use the following command.

sudo aptitude install eject

Summary

In this tutorial we learn how to fix eject command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.