ubuntu/Windows雙系統,在ubuntu隱藏window分區的方法

方法1(不是boot分區有效):ubuntu和windows雙系統的時候,在ubuntu的文件管理器nautilus裏能夠直接點擊掛載windows分區。在對方沒有密碼的狀況下能夠把這個隱藏,來達到限制訪問的目的。
    1.打開終端執行 sudo vi /etc/udev/rules.d/hidden-partition.rules
        2.在裏面寫入下面代碼,隱藏 sda六、sda7
        #sould be placed into /etc/udev/rules.d/
        ACTION!="add|change",GOTO="hide_partitions_end"
        SUBSYSTEM!="block",GOTO="hide_partitions_end"
        KERNEL=="loop*|ram*",GOTO="hide_partitions_end"
         
        ################################################## ############################
         
        #Hide sda6
        KERNEL=="sda6",ENV{UDISKS_PRESENTATION_HIDE}="1"
        KERNEL=="sda7",ENV{UDISKS_PRESENTATION_HIDE}="1"
        ################################################## ############################
        LABEL="hide_partitions_end"
    最後重啓,windows分區就從文件管理器裏消失了。
      
    方法2:Alt+F2 輸入 disks 打開磁盤管理器,選擇windows的分區,如:sda1,點擊下面的設置選項,選擇Edit Mount Options... 把 Automatic Mount Options關掉。Mount at startup和Show in user interface 都勾掉。而後重啓系統。ubuntu

相關文章
相關標籤/搜索