Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文档:Mac支持NTFS手动挡 #15

Open
hoochanlon opened this issue Feb 26, 2023 · 2 comments
Open

文档:Mac支持NTFS手动挡 #15

hoochanlon opened this issue Feb 26, 2023 · 2 comments

Comments

@hoochanlon
Copy link
Owner

Mac支持 NTFS

来自 公众号:优apper 的分享,@iRubbish;感谢,辛苦辛苦。

系统版本 CPU型号
Ventura 13.2 Apple M1
  1. 安装brew

    前往官网查看官网安装教程,安装过程中可能存在安装失败的问题,基本安装失败都是网络的问题。可以尝试使用知乎大佬金牛肖马的国内加速安装脚本。

    brew官网

    国内加速安装

  2. 安装macfuse

    是安装macFUSE,不是安装SSHFS。

    👉点我前往官网

    安装macfuse有两个方式一个是官网下载安装包安装,一个是brew命令行安装。不经常接触命令行的建议还是通过安装包安装比较友好。

    # 安装之前确认是否打开了允许任何来源,没打开的先执行下面的命令
    sudo spctl --master-disable
    # 然后在用命令安装
    brew install --cask macfuse
  3. 安装ntfs-3g

    ⚠️:一定要先安装macFUSE,才能安装ntfs-3g

    # 网上很多说安装ntfs-3g的,我安装时提示这个包只支持Linux没有Mac版本的
    brew tap gromgit/homebrew-fuse
    brew install ntfs-3g-mac
    
  4. 修改安全等级

    官方教程文档

    m芯片跟英特尔芯片区别是进入恢复方式不同,m芯片是关机状态下一直按住开机键,英特尔芯片是关机状态下按 command + r。其他的基本一致,进入恢复模式,选择启动安全性实用工具 - 降低安全性 - 选择“允许用户管理来自被认可的开发者内核拓展”。然后关机重启。

    IMG_4425

    重启完后,通用设置里能看到下图

    image-20230226164832454

  5. 写脚本,代码内容如下👇

    #!/bin/bash
    # 公众号-优apper
    newDev=$(mount | grep ntfs | awk -F ' ' '{print $1}')
    for i in $newDev; do
    onceCutVal=${i%/*}
    twiceCutVal=${onceCutVal#*//}
    thriceCutVal=${i##*/}
    echo "新设备: "${thriceCutVal}
    ## echo '---------\n'
    sudo umount $i
    sudo -S $(which ntfs-3g) /dev/${twiceCutVal} /Volumes/${twiceCutVal}-olocal -oallow_other -o auto_xattr -ovolname=${thriceCutVal}
    echo "新设备: ${thriceCutVal},已可读写!"
    # echo '---------\n'
    echo '---------'
    echo " "
    done
  6. 给予权限

    先给上面的脚本文件授与执行权限,chmod + x ntfs.sh,然后插上U盘,执行一下脚本。

    第一次运行脚本的时候会有下图提示👇,需要按照提示给予权限。

    image-20230226165832951

    image-20230226165930666

    接着重启一遍。

  7. 运行一下刚才那个脚本,然后NTFS设备就可以读写了

    image-20230226170354276

注意事项⚠️

此方式使用有一定的使用门槛在,比较折腾。不建议非专业、不爱折腾等小白用户尝试,

@hoochanlon hoochanlon pinned this issue Feb 26, 2023
@hoochanlon hoochanlon unpinned this issue Jun 12, 2023
@lijunle
Copy link

lijunle commented Sep 29, 2023

图片挂了……

@iRubbish
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants