When attaching a storage device (flash drive, external hard disk, etc) to a computer/operating system (OS), this is visible immediately. It is possible to check this physical presence by running fdisk -l.
However, by attaching this device to the computer, this does not mean that I will be able to access to it straight away. This is because the OS is not aware of the filesystem (or directory tree) being used on this attached device, so the OS does not know how to see the information there, or access/write to it.
Therefore, it is necessary to mount this physical device by creating a logical access, and using a specific filesystem that is related to this device. As soon this happens, the OS can immediately read and write information here.
In other words
Physical device -> Set Filesystem type -> Mount Logical access -> OS can read it!
For example, when attaching an USB driver to my computer, and after running fdisk -l, I can see the physical device could be detected and this becomes physically available by what it shows in the below list:
I also will be able to see the driver listed in my Files as STORE N GO (name of the device):
I can also see precisely what are all the physical associations I have in the system, by running/ls -l /dev/disk/by-id:
If I only want to list all my USB devices, then I can run the command lsub:
Now, if I try to access to this (normally by simply doing a cd /media/aviola/STORE\ N\ GO, this driver will appear as non existent:
In order to make this accessible, I need then to mount this device. I can simply right click on the top of STORE N GO in Files, and then click in the option Mount.
If then I run the command mount in the Terminal, I will be able to see all the storage devices and their logical associations. I can see that /dev/sdb1 is now listed as /media/aviola/STORE N GO.
For umounting this drive again, I can use umount /media/aviola/S <double tab> to get the name completed (this is because there are some spaces and there is the need to use back slash before each space).
The easier way to mount a storage device is by using Files, but what if I want to have more control of what I am doing, and use a command line for that?
I can use the command mount and some parameters to make the logical access to this device available.
Initially I have to create a mount point. Before it was called STORE N GO under media/aviola. I will create something else in /media/external now with the command:
sudo mkdir /media/external
For then attaching the physical device to this mounting partition I can use:
mount /dev/sdb1 /media/external
I did not select any parameter such as if this device has a vfat or ntfs partition. I left the operating system decide that for me. By running mount I can see that the device was mounted correctly.
Please read the article called "Accessing to Files on Android device" for futher information to have access to USB connection using MTP.