I have songs on my pen drive and I wanted to mount on Pi.

when I have inserted USB drive it was not mounted automaticall.

For mounting USB drive when you insert the USB drive it will detected by Pi, you can check using command

dmesg

I got the following in output

[ 3366.886885] usb 1-1.2: Product: USB DISK
[ 3366.886893] usb 1-1.2: Manufacturer: SMI Corporation
[ 3366.887787] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[ 3366.888114] scsi host0: usb-storage 1-1.2:1.0
[ 3368.098823] scsi 0:0:0:0: Direct-Access SMI USB DISK 1100 PQ: 0 ANSI: 4
[ 3368.099886] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 3368.101692] sd 0:0:0:0: [sda] 31299696 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 3368.102771] sd 0:0:0:0: [sda] Write Protect is off
[ 3368.102785] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 3368.103909] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3368.112700] sda: sda1
[ 3368.117118] sd 0:0:0:0: [sda] Attached SCSI removable disk

 

It says USB drive detected (sda: sda1) with sda1. now we need to mount this drive. create any folder name tmp or usb ( I used tmp)

mkdir tmp

then mount the usd drive

mount /dev/sda1 /home/pi/tmp (better you give full path)

It will mount you can check with df command

root@raspberrypi:~# ls
tmp
root@raspberrypi:~# mount /dev/sda1 /home/pi/tmp/
root@raspberrypi:~# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.3G 959M 6.0G 14% /
devtmpfs 458M 0 458M 0% /dev
tmpfs 462M 0 462M 0% /dev/shm
tmpfs 462M 6.3M 456M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 462M 0 462M 0% /sys/fs/cgroup
/dev/mmcblk0p1 42M 21M 21M 51% /boot
/dev/sda1 15G 5.3G 9.7G 36% /home/pi/tmp
root@raspberrypi:~#