Linux自動掛載NTFS格式硬碟__Linux

來源:互聯網
上載者:User


參考文章

http://blog.sina.com.cn/s/blog_65a523dd0100sw5p.html

http://www.filewatcher.com/m/fuse-2.7.1.tar.gz.506312-0.html

http://pkgs.fedoraproject.org/repo/pkgs/ntfs-3g/ntfs-3g_ntfsprogs-2013.1.13.tgz/2d6fb47ddf62b51733227126fe9227fe/

Linux開機自動掛載NTFS格式硬碟

        A、進入/mnt路徑,建立檔案夾命名為【F】

        B、使用fdisk -l 命令查詢硬碟每個區間對應的地址

        C、進入/etc路徑編輯fstab檔案,在最末尾增加如下代碼

                  /dev/sda5      /mnt/E    ntfs-3g    defaults   0 0
                  /dev/sda6      /mnt/F    vfat        defaults   0 0

        C、執行命令mount -a,檢測fstab檔案是否編寫有誤,如編寫正確則掛載硬碟,可開啟/mnt/F檢查


要想達到隨插即用的目的

     用root許可權建立/sbin/mount.ntfs檔案,內容如下:

#!/bin/sh
       export LANG=en_US.UTF-8
       exec /sbin/mount.ntfs-3g "$@"

     儲存後重新插入移動硬碟,看看NTFS格式的分區是不是跟FAT32的分區一樣自動載入了。

     記得給/sbin/mount.ntfs檔案許可權哦  chmod a+x /sbin/mount.ntfs

上面的代碼 要頂格寫。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.