Mounting USB flash drives in Linux

Source: Internet
Author: User

I. mount a USB flash drive in Linux:
1. Insert a USB flash disk to a computer. If only one USB flash disk is inserted and your hard disk is not a SCSI hard disk interface, the hardware name is sda1.
2. Create a USB directory under the MNT directory (for example, [root @ localhost root] # mkdir/mnt/USB)
3. mount a USB flash drive: Mount-T vfat/dev/sda1/mnt/USB
4. unmount the USB flash disk: umount/mnt/USB
5. Delete the USB Directory: Rm-RF/mnt/USB

Ii. User Switching in Linux: difference between Su and Su-

For most Linux distributions, the default account is a common user. To change the system file or execute some commands, the account must be the root user. This requires switching from the current user to the root user, in Linux, commands for switching users are Su or Su-. The following describes the essential differences between the su command and the Su-command: the former only switches the root identity, however, the shell environment is still the shell of a common user, and the latter switches to the root identity together with the shell environment. The path environment variable error does not occur only when the shell environment is switched. After Su is switched to the root user, PWD finds that the working directory is still the working directory of normal users. After Su-command is switched, the working directory is changed to the root working directory. Run the echo $ PATH command to check whether the environment variables after Su and Su are different. Similarly, to switch from the current user to another user, use the Su-command.

Iii. fdisk command parameters and Usage Details

Purpose: Observe the physical usage of the hard disk and separate the hard disk.

Usage: 1. Enter fdisk-L/dev/SDA on the console to observe the usage of the hard disk.

2. Enter fdisk/dev/SDA on the console to enter the split hard disk mode.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.