Create APFS RAM disk on macOS High Sierra

后端 未结 3 1206
余生分开走
余生分开走 2021-01-30 11:24

usually creating RAM disks works with the following commands

hdid -nomount ram://

Returns e.g. /dev/disk2 Then I would format

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-30 11:37

    @Glyph provided the best answer in a comment to the accepted answer, but it deserves its own answer:

    diskutil partitionDisk $(hdiutil attach -nomount ram://$((2048*sizeInMB))) 1 GPTFormat APFS 'Ramdisk' '100%'
    

    Change sizeInMB to your desired size.

    I've updated Glyph's answer to simplify the volume name a little.

提交回复
热议问题