Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the command for linux to mount the hard disk?

Shulou Source: shulou.com Published: 2022-06-02 00:10:04 11月15日 Update

This article mainly introduces what the linux mount hard disk command is, the article is very detailed, has a certain reference value, interested friends must read it!

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

Specific methods:

For linux systems, the removable hard disk with USB interface is treated as a SCSI device. Before inserting a removable hard drive, use fdisk-l or more / proc/partitions to check the hard drive and hard disk partitions of the system.

[root at pldyrouter /] # fdisk-l

After connecting the removable hard drive, use fdisk-l or more.

/ proc/partitions check the hard disk and hard disk partition of the system, you should be able to find an extra SCSI hard disk / dev/sdc and its two disk partitions / dev

/ sdc1, / dev/sdc2, where / dev/sdc5 is the logical partition of the / dev/sdc2 partition, we can hook up / dev/sdc1 and / dev/sdc1 using the following command

/ dev/sdc5 .

# mkdir-p / mnt/usbhd1 # mkdir-p / mnt/usbhd2

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

Note: the-t ntfs parameter should be used for disk partitions in ntfs format and-t vfat parameter should be used for disk partitions in fat32 format. If the Chinese character file name is displayed as garbled 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

Using fdisk partition command and mkfs file system creation command under linux system, the partition of mobile hard disk can be made into ext2 and ext3 format peculiar to linux system. In this way, it is more convenient to use under linux. Just hang up directly using the following command.

# mount / dev/sdc1 / mnt/usbhd1 above are all the contents of the article "what is the command for linux to mount a hard disk?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Hard disk command system format removable hard disk mobile disk face content parameter situation file method directory article two garbled value interest boy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL Microsoft Redmi Shulou Information