Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 新手入門:硬碟分區掛載 Windows 磁碟機教學

編輯:Linux 教學

手動掛載 Windows 分區

先確認兩項資訊

  1. 系統 Locale:echo $LANG。常見:zh_CN.gb2312、zh_CN.gbk、zh_CN.gb18030、zh_CN.UTF-8。切勿隨意更改,否則產生亂碼。
  2. Windows 分區格式:FAT32 或 NTFS(在 Windows 檔案總管屬性可見)。

掛載指令

假設 Locale 為 zh_CN.UTF-8,將 /dev/hda1 (FAT32) 掛載至 /mnt/C:

mount -t vfat /dev/hda1 /mnt/C -o iocharset=utf8
  • Locale 非 UTF-8,將 utf8 改為 gb2312。
  • NTFS 分區:-t ntfs,預設唯 root 可讀。需一般用戶可讀,加 umask=022;需讀寫,加 umask=0。

卸載與忙碌處理

umount /dev/hda1
# 若提示 device is busy
fuser -cu /dev/hda1   # 找出佔用進程 PID
ps PID                # 看程式名稱
kill -9 PID           # 強制結束
umount /dev/hda1

自動掛載:編輯 /etc/fstab

# /etc/fstab
proc /proc proc defaults 0 0
/dev/hda9 / ext3 defaults 0 1
/dev/hda13 none swap sw 0 0
/dev/hdc /media/cdrom iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy auto rw,user,noauto 0 0
/dev/hda10 /mnt/debian ext3 defaults 0 0
/dev/hda1 /mnt/C ntfs utf8,umask=022 0 0
/dev/hda5 /mnt/D vfat utf8,umask=0 0 0
Copyright © Windows教程網 All Rights Reserved