How to mount my phone from a terminal?


When I connected my phone, set it to MTP mode and opened Thunar (or any file manager), my phone appears on the left panel. It's not mounted, which I can see in a terminal:

~ $ cd /run/user/$UID/gvfs
gvfs $ LC_ALL=C ll
total 0
gvfs $ 

When clicking the phone icon in Thunar the phone is mounted:

gvfs $ LC_ALL=C ll
total 0
dr-x------ 1 $USER $USER 0 1970-01-01 01:00 mtp:host=PhoneBrand_PhoneModel_AHexNumber

My questions are:

  1. How can I make my phone mount automatically when it's plugged in and set to MTP mode?
  2. How can I mount the phone from the terminal? I guess the mount command won't do, since this is a phone and not a hard drive or similar. I've found a lot of guides on how to mount smartphones, but none so far on how to mount smartphones in a terminal.

I guess what you are searching is this:


1 Like

With file manager nnn and sshfs/rclone you can mount not only your mobile phone but also any cloud sharing service like Dropbox in a few keystrokes. For phone, instead of MTP mode, you need to have a SSH server running on it.

Here's the relevant wiki section with mode details:

Please feel free to ask any questions. I am the author.

Yes, thanks! That helped a lot! :slight_smile:

Thanks for that information! Look promising. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by