25

I recently got an iPhone 6s. Is there a way to transfer files (music, photos, PDF, or really anything actually) between Ubuntu and the phone? It should not involve syncing via an internet service, as I may have the need to transfer large or private files. Also, I do not want to jailbreak the device.

There are a few results when searching for this on Google, but none seems very up to date.

0

7 Answers 7

11

I don't know whether there's any difference between versions, but I can simply access the files of my iPhone 5s via the file manager when it's plugged over USB (using the AFC protocol).

I'm using iOS 9.2 beta, I have no idea whether it works on 9.1 or earlier. I can access the device from Nautilus' sidebar, if it doesn't show up, try navigating to the following address:

afc://<your iPhone's UDID>/

Also, most music players (at least Rythmbox, Banshee and Clementine) support music synchronization over AFC (Apple File Conduit).

EDIT: I just learned I can easily synchronize my pictures using tools like gThumb.

8
  • it's plugged over USB (using the AFC protocol) how to connect like this Sep 25, 2016 at 2:58
  • 1
    Just plug it in, and it should show up. If it doesn't, make sure you have the package gvfs-backends installed.
    – s3lph
    Sep 25, 2016 at 20:35
  • 3
    pretty sure it should be sudo apt-get install gvfs-backends
    – Chris
    Mar 15, 2017 at 0:13
  • 5
    If you don't know the UDID, check out this answer. Also, if the phone's documents folder shows up automatically you can click it, press Ctrl+L and delete the colon and everything after it like it is shown in this picture.
    – totymedli
    Nov 22, 2017 at 20:34
  • 1
    With this, I can copy files from my iPad to Ubuntu, but can't do the other way round Aug 18, 2020 at 4:06
2

Apple constantly breaks Linux applications' access to iPhones. As of 2019, the best way of uploading and downloading files is to use a 3rd party app on iOS. Apparently, the file you upload is only accessible by that 3rd app.

Phone Drive is a good app for this. First, take note of the IP address of your iPhone, then, when PhoneDrive is in the foreground, typing the IP address of the iPhone from a PC connected to the same local area network would give you a website where you can upload and download files. You can also use FTP protocol on the same iPhone IP address. Phone Drive supports playback of a lot of video and music formats.

https://itunes.apple.com/us/app/phone-drive-file-storage-sync/id431033044

5
  • Thank you, Unfortunately, this does not help much. First, as you notice, the file you upload is only accessible by that 3rd app. This makes the upload feature essentially unuseful. Symmetrically, I guess it will not be able to download, say, photos taken with the phone. In the end, this can be occasionally useful to move a file when you don't have a pendrive and plan to use that file elsewhere (say on another computer), but not much more
    – Andrea
    Jan 3, 2019 at 12:59
  • I've just tested it, and it is exactly what I was looking for! Very cool, and it even supports wget/curl. Many thanks Aug 1, 2020 at 4:18
  • 1
    sudo apt-get install libimobiledevice-utils worked for me in 2021
    – kapellan
    Jan 30, 2021 at 10:48
  • Note, that only the lite version is for free and contains ads#
    – rubo77
    Dec 31, 2023 at 7:05
  • You will find the documents folder in another Bookmark on the left next to the "iPhone" Bookmark
    – rubo77
    Dec 31, 2023 at 7:07
2
+100

libimobiledevice can be installed via a graphics package mgr. or by terminal.

sudo apt install usbmuxd libimobiledevice6 libimobiledevice-utils
mkdir ~/iPhone
ifuse ~/iPhone

(mount directory)

Here

QRCP link

3
  • 1
    you need to install apt install ifuse as well
    – rubo77
    Jan 5 at 14:08
  • mounting with ifuse ~/iPhone shows me folders like ~/iPhone/DCIM/100APPLE/ but where do I put music to see it in iTunes on the phone?
    – rubo77
    Jan 6 at 23:12
  • (If you plug your phone into a USB port, you should be able to view your music files on your Ubuntu OS) I know some about LInux Ubuntu, but I know absolute ZERO about IPhone or iTunes.You might try a Apple support community. Also, I have found that yahoo.com is a good search engine for technical, systems and coding.
    – Nishnabe
    Jan 7 at 2:54
1

Sandisk now makes a USB device that plugs directly into the iphone and can backup and move pictures, music, calendar items, and some file items. It can't do notes and some other items, but what it does it does very well. It is especially nice for multiple large video files. Just dump it on the usb pen drive and plug it into whatever and move the files over.

0
0

FREE and best way for me is installing a webserver in your local machine and share everything via Safari browser on the iPhone, this are the steps YMMV

sudo apt install nginx php-fpm git
mkdir ~/iphoneFiles
sudo nano /etc/nginx/sites-available/default

Delete everything in there and put something like this, remember to modify <YOUR-USER> and if necessary change the php version php7.4-fpm.sock

server {
    listen 80;
    server_name localhost;

    root /home/<YOUR-USER>/iphoneFiles/elFinder;

    index elfinder.src.html;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     }
}

Installing https://github.com/Studio-42/elFinder

cd ~/iphoneFiles
git clone https://github.com/Studio-42/elFinder.git

Configuring elFinder

mv elFinder/php/connector.minimal.php-dist connector.minimal.php

Setting the (probably) right permissions for the upload folder

sudo usermod -a -G www-data $USER
sudo chown -R $USER:www-data elFinder/files/
sudo chmod a+rwx,o-rwx,ug+s elFinder/files/
ln -s ~/iphoneFiles/elFinder/files/ ~/Documents/iphoneFiles

Making nginx to load the new set directives

sudo service nginx reload

Now get your local network IP

hostname -i | awk '{print $1}'

Enter with your iPhone to that IP and start uploading pictures or whatever you want

note: you will need to modify elFinder setting to allow upload of all types of files

sed -i 's/.*uploadDeny.*/'uploadDeny' => array(''),/' elFinder/php/connector.minimal.php
sed -i 's/.*uploadDeny.*/'uploadAllow' => array('all'),/' elFinder/php/connector.minimal.php

If you did everything good you should have your files in:

~/Documents/iphoneFiles
0

To achieve this goal for my girlfriend I prepared a local Nextcloud docker-compose.yml : https://github.com/jclaveau/nextcloud-localhost-docker-compose

Simply clone it, install docker, run start.sh then you can access it with http://your.local.network.ip.

As credentials use:

  • username: the logged user running start.sh
  • password: same as username
2
  • How does Nextcloud help sending the files to your Phone?
    – rubo77
    Dec 31, 2023 at 7:08
  • @rubo77 Her main goal is to free space disk on her phone so to upload files from it to next cloud before deleting them but you can obviously download files from Nextcloud if you want Jan 1 at 11:41
0

It is not easy to send the music to your iTunes library, but you can install VLC from the Appstore. You will find a "Documents" folder in another Bookmark on the left next to the "iPhone" Bookmark in Ubuntus Filemanager (Nautilus)

Note that you should manage your id3-tags correctly, otherwise you get a mess in VLC which cannot sort by Foldernames

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .