udisks, udisks2, udisksctl what is the differences?

In my script, i’m using this to mount and unmount devices. It manages the mount directories, adding and removing.

command_output_scandir=$(udisksctl mount -b "$Device_Label");mount_error=$?

command_output_unmount=$(udisksctl unmount -b "$Device_Label");unmount_error=$?

What are the functional differences between them? “udisk is being phased out in favor udisk2”

Which is in more common use?

Thanks.

udisks2 is the 2nd version of udisks, it replaces udisks.

Which is in more common use?

udisks2 is used by KDE and GNOME nowadays at least (since years). udisks (1) is outdated/obsolete.

And udisksctrl is a command included in udisks2 to be able to control/use it from a shell.

udisks1 has a similar tool, “udisks”.

udisks2 is c programming function
udiskctl is bash command

Did I get that right?

The udisks2 package (suite) provides the udiskctl CLI utility, a daemon (udisksd), udev rules, systemd service file, documentation etc
Take a look at

rpm -ql udisks2

and the man pages it provides

man udisks
man udisksd
man udiskctl

Sorry, that should have been

man udisksctl

I see now. ‘udisks2’ is the yast package. udisksctl, udisks, udisksd are the bash script commands part of the package. Thanks to all for the assistance.

Almost…udisksctl is a CLI program (utility) for users, udisksd is a program (runs in the background as a daemon)

udisksctl makes mounting drives easier with less code. udisksd is started automatically to manage drives and not normally run by a user.

https://udisks.freedesktop.org/docs/latest/

Udisks is a drive configuration manager and access control manager?

Read the man pages. :wink:

Thanks for all the help. :slight_smile: