CentOS挂载ntfs文件系统
2013-11-14 19:36
344 查看
想用ntfs的优盘在两个系统间考东西
今天研究了下如何在CentOS中挂载ntfs文件系统
1.man mount
查找关于ntfs的信息: /ntfs
找到了-t这个参数
-t, --types vfstype
The argument following the -t is used to indicate the filesystem
type. The filesystem types which are currently supported
include: adfs, affs, autofs, cifs, coda, coherent, cramfs,
debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs, hfsplus, hpfs,
iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc, qnx4,
ramfs, reiserfs, romfs, squashfs, smbfs, sysv, tmpfs, ubifs,
udf, ufs, umsdos, usbfs, vfat, xenix, xfs, xiafs. Note that
coherent, sysv and xenix are equivalent and that xenix and
coherent will be removed at some point in the future — use sysv
instead. Since kernel version 2.1.21 the types ext and xiafs do
not exist anymore. Earlier, usbfs was known as usbdevfs. Note,
the real list of all supported filesystems depends on your ker-
nel.
2.使用 mount -t
[quincy@Quincy ~]$ sudo mount -t ntfs /dev/sdb1 /mnt/usb/
出现错误
mount: unknown filesystem type 'ntfs'
查找资料才知道
Centos默认是不支持ntfs文件系统的
Ubuntu、Suse等默认是支持ntfs的
3.使用ntfs-3g
ntfs-3g是一个开源项目
可以让Linux、Mac OS X等系统可以读写ntfs文件系统
到http://www.tuxera.com/community/ntfs-3g-download/
网站下载ntfs-3g
然后就是 编译、安装
tar xf ntfs-3g_ntfsprogs-2013.1.13.tgz
cd ntfs-3g_ntfsprogs-2013.1.13/
./configure --prefix=/app/ntfs-3g
make & make install
现在 可以用 mount -t ntfs-3g 来挂载设备了
例如:mount -t ntfs-3g /dev/sdb1 /mnt/usb/
4.修改/etc/fstab配置文件
如果是双系统且需要频繁的在两个系统间拷贝文件,还可以把windows下一个ntfs的分区挂载到linux上,这样两个系统都可以读写那个分区了
这可以通过修改/etc/fstab文件,让linux每次启动自动挂载
vim /etc/fstab
#
3 # /etc/fstab
4 # Created by anaconda on Tue Oct 22 06:11:14 2013
5 #
6 # Accessible filesystems, by reference, are maintained under '/dev/disk'
7 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
8 #
9 UUID=ce83f292-d692-4849-94b3-f36feb6b9c72 / ext4 de faults 1 1
10 UUID=46d97879-14a7-49b6-92ae-c48f1993ccf4 /boot ext4 de faults 1 2
11 UUID=5145c233-c6f7-45c7-9959-5b447a2bf1a3 swap swap de faults 0 0
12 tmpfs /dev/shm tmpfs defaults 0 0
13 devpts /dev/pts devpts gid=5,mode=620 0 0
14 sysfs /sys sysfs defaults 0 0
15 proc /proc proc defaults 0 0
不知道每个字段的含义,没关系,可以通过man fstab来获得帮助
man fstab
第一个字段是被挂载的块设备 (可以用sudo fdisk -l 查看系统的全部块设备)
第二个字段是挂载点
第三个字段是文件系统类型
第四个字段是关于文件系统的挂载选项
第五个字段是给dump命令使用的
第六个字段是给fsck程序使用的
其中最后面三个字段直接 default 0 0 就可以了
所以我们可以在/etc/fstab文件中增加一行
/dev/sda8 /mnt/ntfs ntfs-3g defaults 0 0
这样重启后,就可以让两个系统访问同一个分区了
今天研究了下如何在CentOS中挂载ntfs文件系统
1.man mount
查找关于ntfs的信息: /ntfs
找到了-t这个参数
-t, --types vfstype
The argument following the -t is used to indicate the filesystem
type. The filesystem types which are currently supported
include: adfs, affs, autofs, cifs, coda, coherent, cramfs,
debugfs, devpts, efs, ext, ext2, ext3, ext4, hfs, hfsplus, hpfs,
iso9660, jfs, minix, msdos, ncpfs, nfs, nfs4, ntfs, proc, qnx4,
ramfs, reiserfs, romfs, squashfs, smbfs, sysv, tmpfs, ubifs,
udf, ufs, umsdos, usbfs, vfat, xenix, xfs, xiafs. Note that
coherent, sysv and xenix are equivalent and that xenix and
coherent will be removed at some point in the future — use sysv
instead. Since kernel version 2.1.21 the types ext and xiafs do
not exist anymore. Earlier, usbfs was known as usbdevfs. Note,
the real list of all supported filesystems depends on your ker-
nel.
2.使用 mount -t
[quincy@Quincy ~]$ sudo mount -t ntfs /dev/sdb1 /mnt/usb/
出现错误
mount: unknown filesystem type 'ntfs'
查找资料才知道
Centos默认是不支持ntfs文件系统的
Ubuntu、Suse等默认是支持ntfs的
3.使用ntfs-3g
ntfs-3g是一个开源项目
可以让Linux、Mac OS X等系统可以读写ntfs文件系统
到http://www.tuxera.com/community/ntfs-3g-download/
网站下载ntfs-3g
然后就是 编译、安装
tar xf ntfs-3g_ntfsprogs-2013.1.13.tgz
cd ntfs-3g_ntfsprogs-2013.1.13/
./configure --prefix=/app/ntfs-3g
make & make install
现在 可以用 mount -t ntfs-3g 来挂载设备了
例如:mount -t ntfs-3g /dev/sdb1 /mnt/usb/
4.修改/etc/fstab配置文件
如果是双系统且需要频繁的在两个系统间拷贝文件,还可以把windows下一个ntfs的分区挂载到linux上,这样两个系统都可以读写那个分区了
这可以通过修改/etc/fstab文件,让linux每次启动自动挂载
vim /etc/fstab
#
3 # /etc/fstab
4 # Created by anaconda on Tue Oct 22 06:11:14 2013
5 #
6 # Accessible filesystems, by reference, are maintained under '/dev/disk'
7 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
8 #
9 UUID=ce83f292-d692-4849-94b3-f36feb6b9c72 / ext4 de faults 1 1
10 UUID=46d97879-14a7-49b6-92ae-c48f1993ccf4 /boot ext4 de faults 1 2
11 UUID=5145c233-c6f7-45c7-9959-5b447a2bf1a3 swap swap de faults 0 0
12 tmpfs /dev/shm tmpfs defaults 0 0
13 devpts /dev/pts devpts gid=5,mode=620 0 0
14 sysfs /sys sysfs defaults 0 0
15 proc /proc proc defaults 0 0
不知道每个字段的含义,没关系,可以通过man fstab来获得帮助
man fstab
第一个字段是被挂载的块设备 (可以用sudo fdisk -l 查看系统的全部块设备)
第二个字段是挂载点
第三个字段是文件系统类型
第四个字段是关于文件系统的挂载选项
第五个字段是给dump命令使用的
第六个字段是给fsck程序使用的
其中最后面三个字段直接 default 0 0 就可以了
所以我们可以在/etc/fstab文件中增加一行
/dev/sda8 /mnt/ntfs ntfs-3g defaults 0 0
这样重启后,就可以让两个系统访问同一个分区了
相关文章推荐
- Centos6 编译安装Python
- 硬盘安装CentOS 6.2以及添加GRUB启动菜单
- CentOS 6.2实战部署Nginx+MySQL+PHP
- 用一整天的时间安装postgreSQL NTFS权限
- Compact 显示和更改 NTFS 分区上的文件或目录压缩
- Chkntfs 显示或指定在启动计算机时计划的自动系统检查是否在 FAT、FAT32 或者 NTFS 卷上运行。
- Convert 将 FAT 和 FAT32 卷转换为 NTFS
- Cipher 在 NTFS 卷上显示或改变文件的加密
- centos 5.6 升级php到5.3的方法
- CentOS mysql安装系统方法
- centos下安装mysql服务器的方法
- CentOS 5.1 4.6最新官方下载地址列表
- Centos搭建GTK+Codeblock完整版
- CentOS 5.1下跑Mono和Asp.net的实现方法
- centos 安装免费控制面板kloxo步骤
- CentOS服务器+监控宝SNMP监控全攻略分享
- Centos 5下配置https服务器的方法
- centos 5.1下的安全设置(适合所有的linux版本)
- 比较详细的基于CentOS的WWW服务器架设指南第1/2页
- CentOS 5.4 服务器配置 yum安装Apache+php+Mysql