su
diskutil list
如下
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *536.9 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 332.0 GB disk0s2 找到此条分区名称
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +332.0 GB disk1
Physical Store disk0s2
1: APFS Volume macOS Mojave 10.14.4 316.3 GB disk1s1
2: APFS Volume Preboot 45.5 MB disk1s2
3: APFS Volume Recovery 510.4 MB disk1s3
4: APFS Volume VM 24.6 KB disk1s4
执行如下命令
diskutil apfs resizeContainer disk0s2 536GB
扩展至536GB