我的电脑装了winwows系统debian系统fedoa6系统三个系统。在debian系统中经常会用到windoes的分区,我使用如下方法:mount /dev/sda1 /mnt/c 进入/mnt/c下遇到中文就显示????,在网上查找资料,在朋友帮助下找到了解决方法。
修改/etc/fstab文件,可以自动挂载。
vi /etc/fstab
内容如下:(大家不一定都相同)
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda7 / ext3 defaults,errors=remount-ro 0 1
/dev/sda6 none swap sw 0 0
/dev/sda1 /mnt/c vfat iocharset=gb2312,umask=0, codepage=936 0 0
红色是我新加内容。这样windows的c盘就能自动挂载了,其他盘也能在这里挂载,方法同上。
注意:
iocharset=gb2312 是采用的字体,vfat 是fat32格式,如果是 ntfs格式这里就写成ntfs
我在网上看了关于fstab文件的写法挺多。大家可以自己再找找如果不好用的话。
# mount /dev/sda1 /mnt/c -t vfat -o iocharset=gb2312
修改/etc/fstab文件,可以自动挂载。
vi /etc/fstab
内容如下:(大家不一定都相同)
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda7 / ext3 defaults,errors=remount-ro 0 1
/dev/sda6 none swap sw 0 0
/dev/sda1 /mnt/c vfat iocharset=gb2312,umask=0, codepage=936 0 0
红色是我新加内容。这样windows的c盘就能自动挂载了,其他盘也能在这里挂载,方法同上。
注意:
iocharset=gb2312 是采用的字体,vfat 是fat32格式,如果是 ntfs格式这里就写成ntfs
我在网上看了关于fstab文件的写法挺多。大家可以自己再找找如果不好用的话。
本文介绍了如何在Debian系统下解决挂载Windows分区时出现的中文乱码问题。通过使用`mount`命令加上`iocharset=gb2312`参数,或者修改`/etc/fstab`文件进行自动挂载设置,可以成功显示中文。同时提到了`vfat`和`ntfs`文件系统的区别,并提醒用户注意不同的字体设置。

1333

被折叠的 条评论
为什么被折叠?



