External hard drive connection

Hello
how Can external hard drives be connected to ubuntu mate in RPI2?(e.g. western digital)

External hard drives should automatically mount supported file systems as soon as you plug it in.

If they are not mounted automatically on the Pi, but the drive is detected, gnome-disks (in the package gnome-disk-utility) is a GUI utility to mount the file systems.

Some hard drives like western digital provide their own apps(e.g WD smart ware ) that disconnect hard drive’s power supply.
How can it be done?