how to connect an android phone with linux to transfer files

the post i am going to present is for connecting your android phone with slackware or any linux distribution and secondly, transfer files to it….

here is the link that send me in the correct path!!! cheers to him!!!

first of all make sure you have the mtpfs library in your system…(slackers can fetch it from

we need to make a mount point for our phone….

i made it in /mnt as in /mnt/phone

once we got mtpfs installed run the below commands as i have typed them…

mtpfs /mnt/phone

mtpfs -o allow_other /mnt/phone

now the final step is to transfer files to phone…but wait….a normal mtpfs-sendfile wont work here…weird…..whats weirder is that android phone has all its folders mapped to a number….you need to use this number to transfer files to it…..

not to worry….mtpfs has the solution for it….

so to get the list of numbers for our folders in the android phone just type


now you get a mapping of key value pairs where each file in your android is mapped to which number…..i wanted to copy an mp3 file and it was 172

so am all set to transfer and i enter the below command:

mtp-connect –sendfile /path/to/file/nightcrawler.mp3 172

voila! and guess what the file was successfully transferred…..


Well that’s one way of doing it without a network around to help you.

Note: am editing this post and updating the content

If you got a wifi network where you use your laptop or desktop you do not have to go through all these hassles like above.

Just download any of the following apps from google play store:




I prefer Xender to Airdroid. its a much better interface.

So now once you got your phone and laptop/desktop connected to the same wifi network all you got to do is open any of the app in your phone.

It gives you an IP as well as a url.

Type it in your favourite browser on your laptop/desktop.

It will ask you “whether you want to accept or reject the connection in your phone”

Click on accept and you are good to go….


NOTE: Its a direct connection and hence it would not consume your ISP(Internet Service Provider) bandwidth or ISP data which is in layman terms as unlimited download and uploads from phone to laptop and vice-versa…

so as always happy slacking folks….


how to mount usb devices in slackware

a small primer or quick steps to mount usb devices on your slackware machine or for any linux distro…

as my personal motto goes: if it works in slackware, you can bet 99.99% its good to go in any other linux or unix flavors too….

before we begin lets switch user (su) to the root user

basically 4 steps to go through:

STEP 1:first, we attach the usb device to our laptop or desktop and check dmesg status to check if the usb is detected. dmesg requires privilege user rights hence we su before we go ahead…..

# dmesg | tail //here, dmesg piped to tail so as to read the last last few lines

usb-storage 2-1.1:1.0: USB Mass Storage device detected
scsi host9: usb-storage 2-1.1:1.0
scsi 9:0:0:0: Direct-Access hp v100w 1100 PQ: 0 ANSI: 4
sd 9:0:0:0: [sdd] 31285248 512-byte logical blocks: (16.0 GB/14.9 GiB)
sd 9:0:0:0: [sdd] Write Protect is off
sd 9:0:0:0: [sdd] Mode Sense: 43 00 00 00
sd 9:0:0:0: [sdd] No Caching mode page found
sd 9:0:0:0: [sdd] Assuming drive cache: write through
sdd: sdd1
sd 9:0:0:0: [sdd] Attached SCSI removable disk

STEP 2: we create a directory in our slackware machine, usually in the /mnt path but yes again you are free to place it anywhere you like..

# mkdir /mnt/usb_device

STEP 3: mount our usb device found from step 1, to this location.
we have seen from the output of step 1 that the usb is attached at sdd
again step 2 is for time use only as when we make this directory it will be available on our machine till we decide to do away with it…you can delete mount point after usage if you want just like how you delete a file….remember everything is treated as a file in *nix (linux or unix)…or keep it for all future usb devices being mounted….if you plan to mount multiple usb’s simultaneously make different mount points for each device….

mount /dev/sdd1 /mnt/ub_device //mounting our usb device to our path created on our machine

STEP 4: now you are good to go…cd to the directory where you mounted your device and browse the contents….

STEP 5: unmount the usb devices from the location using the umount command

umount /mnt/usb_device

happy slacking folks….