Unmount a device partition

udisksctl

  • A command-line program used to interact with the udisksd daemon process.
    More information: <http://storaged.org/doc/udisks2-api/latest/udisksctl.1.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

udisksctl unmount --block-device {{/dev/sdXN}}

click the source code to copy install udisksctl on any operating system with command-not-found.com