LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-15-2010, 12:48 AM   #1
linux.ab
Member
 
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 line...how can i do it...i have no gui interface..all i want to do it by command line..so 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 interface...in opensuse there is windows folder under file system but in ubuntu there is no such option...so if i want to place a file from linux to windows drive such as d ..how can i manage it with command line...no gui interface is available...

I AM USING WINDOWS XP AND UBUNTU 9.10 AS DUAL SYSTEM
 
Old 03-15-2010, 12:57 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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).
Code:
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"

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

Evo2.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 PM.

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