


Ubuntu 自動掛載Windows分區
添加時間:2011-2-19
添加:
admin
自動掛載 windows 分區執行下列命令, 編輯掛載腳本 autowinfs.
sudo gedit /usr/sbin/autowinfs
復制粘貼以下引用的內容, 保存文件, 退出。
mkdir -p /windows/
rmdir /windows/* 1> /dev/null
grep -v '/windows/' /etc/fstab > /etc/fstab.swp
fdisk -l /dev/[hs]d[a-z] | grep 'NTFS' | cut -d' ' -f1 | cut -d/ -f3 | while read WDISKS
do echo "/dev/$WDISKS /windows/$WDISKS ntfs auto,user,nls=utf8,umask=0 0 0" >> /etc/fstab.swp
mkdir "/windows/$WDISKS"
done
fdisk -l /dev/[hs]d[a-z] | grep 'FAT' | cut -d' ' -f1 | cut -d/ -f3 | while read WDISKS
do echo "/dev/$WDISKS /windows/$WDISKS vfat auto,user,utf8,umask=0 0 0" >> /etc/fstab.swp
mkdir "/windows/$WDISKS"
done
mv /etc/fstab.swp /etc/fstab
mount -a
exit 0再運行命令:
sudo chmod +x /usr/sbin/autowinfs
sudo /usr/sbin/autowinfs就可以了,Windows分區將掛載在 /windows/ 下
關鍵字:掛載、分區
新文章:
- CentOS7下圖形配置網絡的方法
- CentOS 7如何添加刪除用戶
- 如何解決centos7雙系統后丟失windows啟動項
- CentOS單網卡如何批量添加不同IP段
- CentOS下iconv命令的介紹
- Centos7 SSH密鑰登陸及密碼密鑰雙重驗證詳解
- CentOS 7.1添加刪除用戶的方法
- CentOS查找/掃描局域網打印機IP講解
- CentOS7使用hostapd實現無AP模式的詳解
- su命令不能切換root的解決方法
- 解決VMware下CentOS7網絡重啟出錯
- 解決Centos7雙系統后丟失windows啟動項
- CentOS下如何避免文件覆蓋
- CentOS7和CentOS6系統有什么不同呢
- Centos 6.6默認iptable規則詳解