How to mount an external device in a Linux system

  

Linux is a command line system, so you want to mount an optical drive, a floppy drive, or a USB flash drive through commands. This article will introduce you to mount on Linux. The method of the external device.

mount -t iso9660 /dev /cdrom /mnt /cdrom hanging drive

mount -t vfat /dev /fd0 /mnt /floppy hanging floppy disk (file type may be selected from within the own )

mount -t vfat -o rw,utf8,umask=000 /dev/sda1 /media/USB

The Linux partition mounted by default on Linux system is not normal. Chinese in the CD-ROM drive also does not display properly. The solution is as follows:

1 Automount

Modify /etc/fstab Add iocharset=utf8

to the mount parameter as follows:

/Dev/sda5 /media/sda5 vfat iocharset=utf8,defaults,umask=0 0 0

/dev/hda /media/cdrom0 udf,iso9660 user,noauto,iocharset=utf8 0 0

Mine is a sata hard drive. /dev/sda5 is a partition of the hard disk. /dev/hda is the optical drive. Where “umask=0” indicates that ordinary users also have read and write permissions.

2 Manual Mounting

Add the parameter -o iocharset=utf8

to the mount as follows:

$ sudo mount -o iocharser= Utf8 /dev/sdb1 /media/usb

Mount Command Details

Function: Load the specified file system.

Syntax: mount [-afFhnrvVw] [-L "Label"] [-o "Options"] [-t "File System Type" [Device Name] [Load Point]

Usage note: mount loads the file system specified in the specified device into the Linux directory (that is, the mount point). Frequently used devices can be written to the file

/etc/fastab so that the system automatically loads each time it starts. The information about the mount device is recorded in the /etc/mtab file. When the device is unloaded using the umount command, the record will be cleared.

Common parameters and options:

-a Load all devices set in the file /etc/fstab.

-f Does not actually load the device. Can be used with parameters such as -v to view the execution of mount.

-F needs to be used with the -a parameter. All devices set in /etc/fstab will be loaded at the same time to speed up execution.

-h Displays online help information.

-L "Label" Loads a device with the file system label labeled "Label".

-n Do not log the loading information in the /etc/mtab file.

-o "Options" Specifies options when loading a file system. Some options are also available in /etc/fstab. These options include:

async performs file system input and output actions in a non-synchronous manner.

atime Updates the access time of the inode every time it is accessed. By default, the cancel option is noatime.

auto This option must be specified in the /etc/fstab file. When the -a parameter is executed, the device set to auto is loaded and deselected as noauto.

defaults uses the default options. The default options are rw, suid, dev, exec, anto nouser, and async.

A character or block device on a dev readable file system with the cancel option set to nodev.

Exec executable binary, the cancel option is noexec.

noatime does not update the access time of the inode every time it is accessed.

noauto cannot be loaded with the -a parameter.

nodev does not read characters or block devices on the file system.

noexec cannot execute binary files.

nosuid Turns off the set-user-identifier and set-group-identifer setting bits.

nouser Makes a user unable to perform a load operation, the default setting.

remount Reload the device. Usually used to change the setting status of the device.
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved