Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-15-2010, 12:48 AM   #1
Registered: Jan 2010
Posts: 63

Rep: Reputation: 15
Question how to mount usb drive in command line IN UBUNTU

hi i want to copy a file from my desktop to usb drive in command can i do it...i have no gui interface..all i want to do it by command kindly help me in this regards..i.e how to mount the usb drive and copy the file to usb and then unmount it..

i also want to access windows xp drive from linux in command line without gui opensuse there is windows folder under file system but in ubuntu there is no such if i want to place a file from linux to windows drive such as d can i manage it with command gui interface is available...

Old 03-15-2010, 12:57 AM   #2
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
You need to use the mount command. The following is an example for a device with at fat file system and would need to be run as root (or with sudo).
mount -t vfat /dev/sdb1 /mnt
you can use the dmesg command to when you connect the device to find out what the device file is (in this case /dev/sdb1).
Copying the files can then be done with the standard commands: eg "cp"

cp ~/Desktop/ /mnt/
Once you have finished you should unmount the device:
umount /mnt
Please read the mount man page, and/or google for tutorials for more information.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
After upgrading to Ubuntu 9.10 external USB drive won't auto mount sombs Linux - Newbie 2 11-15-2009 07:50 AM
mount a (windows) network drive using command line idokus Linux - Software 4 12-17-2008 08:00 AM
Mount USB drive from command line rcrummett Linux - Newbie 10 09-25-2008 05:16 PM
can not mount a samba drive on command line but see via GUI cricballa Linux - Newbie 9 10-20-2007 08:40 PM
Saving a file to a USB thumb drive from the command line dbough Linux - Newbie 7 04-17-2007 07:21 PM

All times are GMT -5. The time now is 04:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration