Coping Photos from Camera to Linux with Gphoto2


Install gphoto2

sudo apt-get install gphoto2

Example from my camera:


To make sure I can see camera

billf@mars $ gphoto2 –auto-detect

Model Port


USB PTP Class Camera usb:004,098


billf@mars ~/Downloads $ gphoto2 –list-ports
Devices found: 2
Path Description
ptpip:PTP/IP Connection
usb:003,012  Universal Serial Bus

Model Port
USB PTP Class Camera  usb:003,012
billf@mars ~/Downloads $ gphoto2 –summary
Camera summary:
Manufacturer: Nikon Corporation
Model: L30
Version: COOLPIX L30 V1.0
Vendor Extension ID: 0xa (1.0)
Vendor Extension Description: 1.0;

Capture Formats: JPEG
Display Formats: Undefined Type, Association/Directory, Defined Type, JPEG, DPOF, MS AVI, Apple Quicktime, MS Wave

Device Capabilities:
File Download, File Deletion, File Upload
Generic Image Capture, No Open Capture, No vendor specific capture
Nikon Wifi support

Storage Devices Summary:
StorageDescription: L30
VolumeLabel: None
Storage Type: Removable RAM (memory card)
Filesystemtype: Digital Camera Layout (DCIM)
Access Capability: Read-Write
Maximum Capability: 15539896320 (14820 MB)
Free Space (Bytes): 13047693312 (12443 MB)
Free Space (Images): 2354

Device Property Summary:
Property 0xd407:(read only) (type=0x6) 1
Property 0xd406:(readwrite) (type=0xffff) ”
Property 0xd002:(readwrite) (type=0x6) Enumeration [1,2,3,4,5,6,7] value: 6
Date & Time(0x5011):(readwrite) (type=0xffff) ‘20150910T154012’
Flash Mode(0x500c):(readwrite) (type=0x4) Enumeration [1,2,3,4] value: Automatic flash (1)
Focus Mode(0x500a):(readwrite) (type=0x4) Enumeration [2,3] value: Automatic (2)
Focal Length(0x5008):(read only) (type=0x6) Enumeration [3500,4600,5300,6100,7300,8600,10500] value: 35 mm (3500)
Battery Level(0x5001):(read only) (type=0x2) Enumeration [2,5,25,50,65,80,100] value: 80% (80)
Property 0xd303:(read only) (type=0x2) 1

billf@mars ~/Downloads $ gphoto2 –list-files
There is no file in folder ‘/’.
There is no file in folder ‘/store_00010001’.
There is no file in folder ‘/store_00010001/DCIM’.
There are 200 files in folder ‘/store_00010001/DCIM/100NIKON’.
#1  DSCN0520.JPG rd  8757 KB 5152×3864 image/jpeg
#2 DSCN0521.JPG rd 8631 KB 5152×3864 image/jpeg
#3 DSCN0522.JPG rd 8616 KB 5152×3864 image/jpeg
#4 DSCN0523.JPG rd 8060 KB 5152×3864 image/jpeg
#5 DSCN0524.JPG rd 8644 KB 5152×3864 image/jpeg
#6 DSCN0525.JPG rd 8755 KB 5152×3864 image/jpeg
#7 DSCN0526.JPG rd 7622 KB 5152×3864 image/jpeg
#8 DSCN0527.JPG rd 7185 KB 5152×3864 image/jpeg
#9 DSCN0528.JPG rd 8342 KB 5152×3864 image/jpeg
#10 DSCN0529.JPG rd 8139 KB 5152×3864 image/jpeg
#11 DSCN0530.JPG rd 8769 KB 5152×3864 image/jpeg
#12 DSCN0531.JPG rd 8888 KB 5152×3864 image/jpeg
#13 DSCN0532.JPG rd 8759 KB 5152×3864 image/jpeg
#14 DSCN0533.JPG rd 8744 KB 5152×3864 image/jpeg
#15 DSCN0534.JPG rd 8678 KB 5152×3864 image/jpeg
…. will show all pictures and videos


gphoto2 –get-all-files

Make sure you are in the directory you want to be in to download the files


Camara PTP with gphoto2


Leave a Reply

Your email address will not be published. Required fields are marked *