gphoto2 is an open-source command-line program for controlling digital cameras from a computer, built on the libgphoto2 library from the same project. Developed by the gPhoto project, it runs on Linux, macOS, and other Unix-like systems. It communicates with cameras mainly over PTP and supports downloading images, remote capture, reading and changing camera settings, and live view across thousands of camera models.
Because it works from the command line without a graphical interface, it is widely used in scripts and automated setups, and many photo management applications access cameras through libgphoto2.