thereThere are two ways to mount a usbUSB or external device like harddrive to unixa hard drive on Unix/linuxLinux based systemsystems.i I will explain the manual mounting so you can understand better.
openOpen a terminal window and become the "root" user.
To become the root user, type in the following commands.:
NOTE : My system only has one USB device plugged in. If you have multiple devices plugged in, it will recognize them as well as your flash device, so your output will most likely look very differently than mine.NOTE: My system only has one USB device plugged in. If you have multiple devices plugged in, it will recognize them as well as your flash device, so your output will most likely look very differently than mine.
- The "cd Desktop"
cd Desktopcommand tells the computer to go into the Desktop directory (this is where I want to make the directory, so I can access the flash drive directly from my Desktop). - The "mkdir flash"
mkdir flashcommand makes a directory named "flash" which we're going to use to mount the flash drive.
weWe need to get the appropriate device which is attached to your flash drive. To do this, simply issue the following command in the same terminal window.
As you can see, there are three lines of output, but they are all the same. The information we're interested in is the output immediately after "SCSI device". On my machine it's sdasda.
This is the device we're looking for. On most machines this will be the case. If you've got a newer machine with ana SATA drive or a SCSI drive in it, the output will most likely be quite different. The words you'll be looking for will probably be sdbsdb or sdcsdc. To make sure you select the correct device, simply look for some information that describes your flash drive. For example, my flash drive has 16 megabytes of storage on it. On the output, the words (16 MB) would be a good indicator of that being my flash drive.
When you've found the correct device (sdasda, sdbsdb, sdcsdc, etc...) enter the following command into the same terminal window:
"pwd" is used to see where the path is to your Desktop, so we can accurately mount the flash drive. You'll use the line after it later.
The next command is the command to mount your flash drive to the flash directory. Let's break that down so we can understand it.
"mount" is the command used.
"-t vfat" tells the command to mount the "vfat" filesystem (which most flash drives are).
"-o uid=jason,gid=users" makes the mount accessible by the "jason" user. You'll want to change this to the user with which you use to log in. Example: if you use the username "jhamilton" to log in, you'd use "-o uid=jhamilton,gid=users" instead.
pwdis used to see where the path is to your Desktop, so we can accurately mount the flash drive. You'll use the line after it later."/dev/sda" points to the correct device. Make sure you use the same device you found earlier. Example: If you found your correct device to be "sdc" earlier, you'd use "/dev/sdc" instead.
The next command is the command to mount your flash drive to the flash directory. Let's break that down so we can understand it."/home/jason/Desktop/flash" is the directory to which you want the device to be mounted. You'll want to use the results of the "pwd" command here. Example: If the line after the "pwd" command was "/home/jhamilton/Desktop" you'd use "/home/jhamilton/Desktop/flash" instead.
mountis the command used.-t vfattells the command to mount the "vfat" filesystem (which most flash drives are).-o uid=jason,gid=usersmakes the mount accessible by the "jason" user. You'll want to change this to the user with which you use to log in. Example: if you use the username "jhamilton" to log in, you'd use-o uid=jhamilton,gid=usersinstead./dev/sdapoints to the correct device. Make sure you use the same device you found earlier. Example: If you found your correct device to be "sdc" earlier, you'd use/dev/sdcinstead./home/jason/Desktop/flashis the directory to which you want the device to be mounted. You'll want to use the results of thepwdcommand here. Example: If the line after thepwdcommand was/home/jhamilton/Desktopyou'd use/home/jhamilton/Desktop/flashinstead.