umount.udisks2 command not found

In this troubleshooting guide we learn how to fix umount.udisks2 command not found error message

Introduction

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

umount.udisks2: command not found

or when using sudo you get the following error message

sudo: umount.udisks2: command not found

Solutions to umount.udisks2: command not found

How To Fix umount.udisks2: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu umount.udisks2 is provided by udisks2 package.

udisks2 is:

The udisks daemon serves as an interface to system block devices, implemented via D-Bus. It handles operations such as querying, mounting, unmounting, formatting, or detaching storage devices such as hard disks or USB thumb drives.

This package also provides the udisksctl utility, which can be used to trigger these operations from the command line (if permitted by PolicyKit).

Creating or modifying file systems such as XFS, RAID, or LUKS encryption requires that the corresponding mkfs.* and admin tools are installed, such as dosfstools for VFAT, xfsprogs for XFS, or cryptsetup for LUKS.

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

sudo apt-get -y install udisks2

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

You can also use apt command to install udisks2.

sudo apt -y install udisks2

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

sudo aptitude install udisks2

Summary

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