How To Mount Connect USB External Drive Pendrive In Linux Shell Command Post Description:
Post Tags: how, to, mount, connect, usb, external, drive, pendrive, in, linux, shell, command, tutorial, guides, howto, teach, learn, computer, programming, support This Post Has Been Viewed 8570 Times Since Sat Jan 13, 2007 8:06 pm Posted By unix with 24 replies
How To Mount Connect USB External Drive Pendrive In Linux Shell Command
How To Connect Mount USB Pen Drive In Linux Unix Shell Command Tutorial
ok, today i wanted to transfer some files from my portable pin drive into my linux server. when i was using windows xp, the system would automatically recognize the usb device and would install it. but in linux, things are different.so to help anyone outhere who wants to know how to mount or connect their USB device into linux this is how you do it.
Login is root and send this command:
ls /dev
After you send this command, you will see something like this:
Notice the difference, now I see sda and sda1, so now i can mount the sda1 device which is my pin drive. but first i want to make sure i have a directory where i can mount the sda1. so execute this command next:
ls /mnt
Most likely you wont see a USB or anything that you can mount the usb drive. asuming you don't have a USB directory, which is my case, i will create a directory called "usb" so to that send this command:
mkdir /mnt/usb
Now that you have created the usb directory its time to mount your device, so send this command:
mount -t auto /dev/sda1 /mnt/usb
Ok, you have have mounted the usb device, nos list all the files in the /mnt/usb with this command:
ls /mnt/usb
REMEMBER, don't remove (disconnect) your pendrive until you have unmounted the usb device, so to unmount it send this command:
umount /mnt/usb
ALSO: if you try to unmount the device and you get something like this:
[root@host usb]# umount /mnt/usb
umount: /mnt/usb: device is busy
umount: /mnt/usb: device is busy
Send this command if you get a "device is busy" message:
cd /
and try to unmount it again. If it failed it was because you were in the /mnt/usb directory so you needed to get out before you unmount it.
also note that i used this same procedure to mount an external drive i bought at my electronics store. I bought a Wolverine (Wolvorine) 100GB USB 2.0 External Drive and it worked great to back up some files i had.
Hope this helps - thanks to the fold at www.webune.com for their support on this question.
hope this helps
Leave Your Comments
Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites
Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
Comments and replies About How To Mount Connect USB External Drive Pendrive In Linux Shell Command
:: 1 :: Reply #173 Reply By Clove On Sat Feb 03, 2007 5:59 pm
Thanks for this tutorial, i found it very helpful and easy to understand. it was just what i was waiting for. Good Job.
:: 2 :: Reply #352 Reply By mounting On Tue Feb 13, 2007 10:47 pm
I bought a wolverine usb external drive, i tried to mount it on my linux machine according to your instructions and it worked perfect. thanks for the greate information.
:: 3 :: Reply #478 Reply By unix On Mon Feb 19, 2007 10:26 pm
this works also for umount: /net: device is busy
:: 4 :: Reply #813 Reply By rosa On Tue Mar 13, 2007 1:28 pm
thanks! exactly what i was looking for.
:: 5 :: Reply #2048 Reply By ceylot On Mon Apr 30, 2007 3:54 am
Great tutorial. Really helped me!
Thanks
:: 6 :: Reply #9107 Reply By webune On Sun Jul 01, 2007 10:49 am
i followed your steps, but on my machine it was sdb and sbd1. so if you are trying and sda1 doesn't work, try sdb1
:: 7 :: Reply #19845 Reply By vikas On Wed Sep 12, 2007 2:10 am
thanx dear.
i found this info. very usefull but i faced problem while executing
mount -t auto/dev/sda1 /mnt/usb
error message was
mount:fs type ntfs not supported by kernel
pls give me some guidelines so i can mount my usb pendrive
:: 8 :: Reply #19879 Reply By unix On Wed Sep 12, 2007 10:05 am
ntfs is for windows only, you're pendrive is formatted in windows, so it won't work in a linux computer. when the pendrive was formated, it was formated with ntfs partition, if the partition was fat or fat32, linux would be able to see it, but since its ntfs, you won't be able to get to to work on a linux computer. - sorry.
:: 9 :: Reply #27956 Reply By Dingo On Fri Nov 16, 2007 2:11 pm
to the last commenter: you can mount ntfs, and with many options (as long as your kernel supports it of course). search for ntfs3g, fuse, fusermount, etc etc. there are numerous good resources for ntfs+linux. i deal with ntfs drives on linux on a daily basis with perfect results. typically any new linux distro supports this natively from a vanilla install.
:: 10 :: Reply #38717 Reply By sureshkumar On Tue Jan 29, 2008 4:04 am
i don't how can mount the usb device in the linux os but real i thinks you it working ....got of thanks
:: 11 :: Reply #49923 Reply By abhay vikram singh On Sun Apr 13, 2008 10:47 am
thanku it works ...
but can u tell me why to use "dmesg" command to mount the pen drive..............
:: 12 :: Reply #54359 Reply By nilesh On Mon May 19, 2008 10:13 am
its very helpfull comand for me and the command deatils are so simple
:: 13 :: Reply #59165 Reply By lary On Tue Jun 24, 2008 10:19 am
warning.
be sure to compare the before and after, because sda1 is not gonna always be the sub device you just connected on your usb port. today i followed this tutorial but i ignored comparing the before and after and i mounted sda1 but that was not my usb drive. so i compared them and found out that actually its sdb1.
thanks for showing how to do this. it show me exactly what to do and imple to follow instructions
:: 14 :: Reply #60948 Reply By neetin On Wed Jul 09, 2008 1:54 am
it is ok that have solved my problem. but somebody suggest the mount drive with option -o loop why? .after that i can copy files but unmount is fails. why? can you answer.
:: 15 :: Reply #68333 Reply By deepak On Wed Aug 27, 2008 6:58 am
it is fantastic support.
thanks a lot
:: 16 :: Reply #69436 Reply By Shashidhara HN On Fri Sep 05, 2008 3:31 am
good explanation.
:: 17 :: Reply #70130 Reply By John MOntgomery On Wed Sep 10, 2008 4:04 pm
thanks very much that helped me get access to my hd
:: 18 :: Reply #73593 Reply By sarvajeet On Thu Oct 02, 2008 8:55 pm
very good guidance
:: 19 :: Reply #73779 Reply By MJ On Sat Oct 04, 2008 12:58 am
thanks a lot. served me well. =)
:: 20 :: Reply #74712 Reply By noname On Thu Oct 09, 2008 8:33 pm
really helpful
:: 21 :: Reply #76862 Reply By Sameer On Thu Oct 23, 2008 12:31 am
how to connect usb in unix os ???
:: 22 :: Reply #79590 Reply By unix On Thu Nov 06, 2008 11:39 am
**************** attention ***************
mine was not sda1 it was sdb1
***********************
:: 23 :: Reply #80777 Reply By happylife On Tue Nov 11, 2008 10:38 pm
thank you so much for your abovedetailed explanations!!! actually i'm really new to linux so your post here is really helpful.
thanks!!!
:: 24 :: Reply #82904 Reply By ganesh On Sun Nov 23, 2008 9:43 pm