A grinding unit (12) for selectively grinding beans (20), in particular coffee beans, is disclosed. The grinding unit comprises a plurality of storage containers (16, 18) for storing the beans (20) and a grinding module (14) associated to the storage containers for grinding the beans. The grinding unit comprises a plurality of shutters (28, 30), wherein each of the shutters is associated to one of the storage containers for feeding the beans from a selected storage container to the grinding module, wherein the shutters are movable with respect to each other to selectively feed the beans from the selected container to the grinding module. An actuation unit (46) is associated to the shutters for actuating the shutters and for opening and closing the storage containers independently. The grinding unit comprises a control unit (32) for controlling the actuation unit in order to open and close the selected storage container and for controlling the grinding module, wherein the control unit is adapted to start drivi