硬盘安装Linux_硬盘安装linux双系统_硬盘安装linux

序言

通常我们使用的移动硬盘或U盘一般都是ntfs或fat32的文件系统类型。

绝大多数Linux发行版内核支持fat32文件系统硬盘安装linux,因此我们直接mount即可挂载;

然而对于ntfs格式的设备,Linux系统并不支持直接挂载,需要安装ntfs-3g包

今天我们学习下服务器如何挂载fat32及ntfs设备

一、linux服务器挂载FAT32 U盘(移动硬盘)步骤:

1)将U盘插入USB接口,检查是否插好

2)找到U盘所在设备硬盘安装linux,比如我的就是/dev/sdb1

[root@qll251 ~]# fdisk -l | grep FAT32/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)

3)创建挂载点,比如/fat32

[root@qll251 ~]# mkdir /fat32

4)挂载U盘

[root@qll251 ~]# mount -t vfat /dev/sdb1 /fat32# 挂载成功后,我们可以在/fat32目录下识别到U盘中的内容

卸载U盘

[root@qll251 ~]# umount /fat32[root@qll251 ~]# rm -rf /fat32

二、Linux服务器挂载NTFS移动硬盘步骤:

1)安装ntfs-3g

ntfs-3g有两种安装方式,一种是使用yum进行安装,一种是使用源码包进行编译安装。

以下两种安装方式,您可按需选择。

如果您对yum源的搭建不太熟悉,参考:

1. yum方式安装ntfs-3g

[root@qll251 ~]# yum -y install ntfs-3g

2. 源码包方式安装ntfs-3g

# 我们从官网上 下载ntfs-3g源码包;[root@qll251 ~]# wget https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2017.3.23.tgz# 如果您的服务器不能连接互联网,可以利用WinSCP将源码包上传至服务器

[root@qll251 ~]# yum -y install gcc # 安装gcc编译器[root@qll251 ~]# tar -zxvf ntfs-3g_ntfsprogs-2017.3.23.tgz[root@qll251 ~]# cd ntfs-3g_ntfsprogs-2017.3.23/[root@qll251 ntfs-3g_ntfsprogs-2017.3.23]# ./configure && make && make install

2)找到移动硬盘所在设备,比如我的就是/dev/sdc1

[root@qll251 ~]# fdisk -l | grep NTFS/dev/sdc1 * 1 244 1955776+ 7 HPFS/NTFS

3)创建挂载点并挂载

[root@qll251 ~]# mkdir /ntfs[root@qll251 ~]# mount -t ntfs-3g /dev/sdc1 /ntfs

卸载移动硬盘

[root@qll251 ~]# umount /ntfs[root@qll251 ~]# rm -rf /ntfs

三、常用mount案例

最后给大家列举下企业中常用的mount案例

更多帮助信息请参阅 :mount --help 或者 man mount

硬盘安装linux双系统_硬盘安装Linux_硬盘安装linux


限时特惠:
本站持续每日更新海量各大内部创业课程,一年会员仅需要98元,全站资源免费下载
点击查看详情

站长微信:Jiucxh

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注