Home > Operation and Maintenance > Linux Operation and Maintenance > What is the command to mount a hard disk in Linux?

What is the command to mount a hard disk in Linux?

王林
Release: 2022-12-30 11:13:47
Original
29005 people have browsed it

The command for linux to mount a hard disk is mount. Specific method: First execute the [mkdir -p directory name] command to create a mount point; then execute the [mount -t ntfs /dev/sd mount point] command to complete the mounting.

What is the command to mount a hard disk in Linux?

The operating environment of this article: red hat enterprise 6.1 system, thinkpad t480 computer.

Specific method:

For Linux systems, the mobile hard disk with USB interface is treated as a SCSI device. Before inserting the mobile hard disk, you should first use fdisk –l or more /proc/partitions to check the system’s hard disk and hard disk partitions.

[root at pldyrouter /]# fdisk -l
Copy after login

After connecting the mobile hard disk, use fdisk –l or more.
/proc/partitions Check the system's hard disk and hard disk partitions. You should find that there is an additional SCSI hard disk /dev/sdc and its two disk partitions /dev
/sdc1 and /dev/sdc2, of which / dev/sdc5 is a logical partition of the /dev/sdc2 partition. We can use the following command to mount /dev/sdc1 and
/dev/sdc5.

#mkdir -p /mnt/usbhd1 
#mkdir -p /mnt/usbhd2
Copy after login

Note: Create a directory to be used as a mount point

#mount -t ntfs /dev/sdc1 /mnt/usbhd1 
#mount -t vfat /dev/sdc5 /mnt/usbhd2
Copy after login

Note: Use the -t ntfs parameter for disk partitions in ntfs format, and use the -t ntfs parameter for fat32 format disk partitions. -t vfat parameter. If the Chinese character file name is displayed as garbled characters or not displayed, you can use the following command format.

#mount -t ntfs -o iocharset=cp936 /dev/sdc1 /mnt/usbhd1 
#mount -t vfat -o iocharset=cp936 /dev/sdc5 /mnt/usbhd2
Copy after login

Using the fdisk partition command and the mkfs file system creation command under the Linux system can make the partition of the mobile hard disk into the ext2 and ext3 format unique to the Linux system. In this way, it is more convenient to use under Linux. Use the following command to connect directly.

#mount /dev/sdc1 /mnt/usbhd1
Copy after login

Related recommendations: linux tutorial

The above is the detailed content of What is the command to mount a hard disk in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template