Linux Learning Experience: mounting a USB flash drive
Source: Internet
Author: User
How to Learn about Linux: mount a USB flash disk-general Linux technology-Linux technology and application information. For more information, see the following. Beautiful mood of the author
Linux is Linux, and most operations rely on commands. The graphic interface is just one of the applications. However, I like to work with commands. Today is the first day of learning Linux to attach a USB flash disk to Linux, I searched the internet and said that I had to use fdisk-l to find the drive letter of the USB flash drive, which is generally sd *. So I did it and the problem came, enter the fdisk-l prompt "command not found" in the terminal to find the reason for surfing the Internet. It turns out that the fdisk command is in the/sbin directory, and the environment variable does not include/sbin, therefore, there are two methods to use fdisk: Input/sbin/fdisk and edit bash_profile. Enter su and press enter at the command prompt to set the administrator password to enter the root directory, enter gedit. bash_profile: There is something wrong with it. The online articles put the profile into a porfile. As a result, all the recipients copy and paste the profile directly, instead of taking a good look at it. root does not have it below. bash_porfi So if you make a mistake, you will see an empty file with nothing in it. after bash_profile, find PATH = $ PATH: $ HOME/bin and add:/sbin, that is, PATH = $ PATH: $ HOME/bin:/sbin, save and exit, after the system is restarted, fdisk can be used directly ~ Log out of the current user directory. I tried it. It is available in both the root directory and the user directory. bash_profile: At first, I only edited the files under the root directory, but it is difficult to make them work after restart. It does not work when I enter the root directory. Later, I found the files under the user directory, edited successfully.
Mount the usb flash disk and use fdisk to determine that the usb flash drive is sda. Then, create a folder under/mnt/and name it at will, for example, usb (converted to the root directory ), then input mount-t vfat/dev/sda/mnt/usb and press enter to view the files in the usb disk under the usb folder.
Unmount the USB flash disk and enter umount/dev/sda and press Enter.
Of course, the operation is the same without running commands on the graphic interface. After the USB flash drive is inserted, a USB flash drive icon appears on the desktop. You can double-click the icon and right-click the icon and select umount when uninstalling it.
However, the problem we encountered today is that my USB flash drive contains an AVI video file, and double-click the USB flash drive icon and the system will crash. I am a beginner and I don't know what's going on, I wonder if Linux does not recognize video format files in Windows? As a result, the experiment failed many times. Later, I deleted the video and changed it to a text file. This was a success, but I wrote Chinese characters in the text file, garbled characters are displayed in the English system.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.