Get shutter counter for Canon cameras on Linux

It can be useful to know the shutter counter for your Canon reflex camera, for example to compare with the data available here: http://www.olegkikin.com/shutterlife/.

Wait no more, it is easy to access the shutter counter with gphoto2 on Linux.

Let's start with the installation of gphoto2 (replace apt with your favorite package manager):

apt install gphoto2

Then plug the camera to the computer with an USB cable and then:

gphoto2 --auto-detect

It should show something like this:

Model                          Port                                            
----------------------------------------------------------
Canon EOS 700D                 usb:001,007
/// 


Then

gphoto2 --get-config /main/status/shuttercounter


and this is it:

Label: Shutter Counter Type: TEXT Current: 14611 ///