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.

Andrea
  • 1,299

7 Answers7

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.

s3lph
  • 14,314
  • 11
  • 59
  • 82
  • it's plugged over USB (using the AFC protocol) how to connect like this – Kasun Siyambalapitiya Sep 25 '16 at 02: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 '16 at 20:35
  • I ran sudo apt-get update and then sudo apt-get install gvsf-backends then it notifies me that I am having the latest one installed. But when I connect iphone to Ubuntu, only I am able to copy the camera photos ( and other pdfs, pptx...) to my computer only, I cannot copy ones from my computer to the iphone. I even tried Banshee but it doesnot have devices tab in the left side. How to Sync music and videos from Ubuntu 16.04 to iphone 4s? – Kasun Siyambalapitiya Sep 26 '16 at 01:28
  • 3
    pretty sure it should be sudo apt-get install gvfs-backends – Chris Mar 15 '17 at 00: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 '17 at 20:34
  • 1
    With this, I can copy files from my iPad to Ubuntu, but can't do the other way round – Nagabhushan S N Aug 18 '20 at 04:06
  • I use cable connection with IPhone to copy photos and videos. Bluetooth is used for sharing the internet of the mobile network. Ubuntu 22.04.1, iOS 16.1.1. – Mahler Dec 06 '22 at 17:27
  • I tried this on Ubuntu 22.04. You have to add hyphen after the afc://. Open Nautilus with CTRL+L and edit the Addressline to afc://'000080200001682A0C6A002E' which looks the same as if you just klick on the Folder for your iPhone in the left bar in Nautilus – rubo77 Dec 31 '23 at 07:10
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

Tankman六四
  • 1,681
  • 2
  • 18
  • 23
  • 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 03 '19 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 – Igor Chubin Aug 01 '20 at 04:18
  • 1
    sudo apt-get install libimobiledevice-utils worked for me in 2021 – kapellan Jan 30 '21 at 10:48
  • Note, that only the lite version is for free and contains ads# – rubo77 Dec 31 '23 at 07:05
  • You will find the documents folder in another Bookmark on the left next to the "iPhone" Bookmark – rubo77 Dec 31 '23 at 07:07
2

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

Nishnabe
  • 389
  • 1
    you need to install apt install ifuse as well – rubo77 Jan 05 '24 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 06 '24 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 07 '24 at 02: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.

Barry
  • 11
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/&lt;YOUR-USER&gt;/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
D.Snap
  • 333
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
  • How does Nextcloud help sending the files to your Phone? – rubo77 Dec 31 '23 at 07: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 – Jean Claveau Jan 01 '24 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

rubo77
  • 32,486