I only have access to the command line I need to backup my data (on the user folder) to a pen.
I don't know where/how can I do this is order to access the pen, and then do the
How can we do this?
1. Find what the drive is called
You'll need to know what the drive is called to mount it. To do that fire off:
You're looking for a partition that should look something like:
2. Create a mount point
Create a new directory in
When you're done, just fire off:
No sudo needed. Replace "sdb1" with your specific device path. For more information see the manpage:
In addition to using the standard
To do this it is useful (but not required) to know a few things about the drive first:
Knowing these you can use a simple command to mount a drive from the command line.
this call should echo the path it is mounted at if the mount succeeds.
To unmount drives mounted in this way you can run:
If you do not know which device it is or what filesystem it uses do not fear. You can easily print out all that information with this little command:
This will print out something like this:
Those that have
This means that, for example, if i wanted to mount the device 'USB DRIVE' i would run the command
These commands all work using the
Using similar commands one can control almost every aspect of ones experience in Ubuntu and simulate most system programs and functions (i.e. shutdown, volume change, etc.).
That's simple. When I want to use a usb drive in terminal I do this:
Create a folder in
This folder will be used for the mount point. Use this command:
If you want to list the files in drive you can use the
To unmount the drive you can use
Note that in my system the usb drive is
I've found that the mount command (listed as first response/answer above) is great to have the system make the USB drive available for use. If I want to copy bunches of files and/or folders from the USB drive to my internal drive, I love to use the MC (Midnight Commander) interface! MC lets you work in two side-by-side panes, tab between each pane, use the different menus or "buttons" to copy/move/delete, etc bunches of files/folders, use filtering to only select certain files (with wild cards, etc.) Really great tool that take the sting out of console work. Should be available in your favorite repository!
You can also automatically mount USB devices on Ubuntu Server with the help of USBmount.
Make sure you run apt-get update/upgrade before starting the installation:
Now install USBmount from the repositories:
USBmount mounts all USB drives in
Now plug a USB drive and wait for it to be detected and mounted. As long as the host OS supports the File System it should be mounted.
To verify whether the USB drive was mounted correctly you can use
To un-mount a drive you can use umount.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?