Device Name

Rename via Terminal

Open a Terminal and type in the following command, replacing “device-name” with the name that will identify the device:

sudo scutil --set ComputerName "device-name"
sudo scutil --set LocalHostName "device-name"
sudo scutil --set HostName "device-name"

This will set the device name in the following places:


APFS

Resize container

Currently it is not possible to shrink/extend the size of an APFS container using the Disk Utility app. To resize an APFS container, use the following commands:

# list all partitions if needed
diskutil list
# the output will look something like this
IDENTIFIER
/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                 Apple_APFS Container disk3         160.0 GB   disk2s2

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +160.0 GB   disk3
                                 Physical Store disk2s2
  1:                APFS Volume MacOS - Daten           112.0 GB   disk3s1
   2:                APFS Volume Preboot                 82.9 MB    disk3s2
   3:                APFS Volume Recovery                529.0 MB   disk3s3
   4:                APFS Volume VM                      1.1 MB     disk3s4
   5:                APFS Volume MacOS                   11.2 GB    disk3s5

As all partitions inside a single APFS container share the whole space of this container, you only need to resize the container itself. The partitions will be able to use all the space afterwards.

For example, if you want to resize the container as shown above from 160 GB to 450 GB, you may use this command:

# be sure to use the actual APFS Container Scheme ID -> disk3 in this case
sudo diskutil apfs resizeContainer disk3 450g

# the output will look something like this
Started APFS operation
Aligning grow delta to 289.999.998.976 bytes and targeting a new physical store size of 449.999.998.976 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 499.897.077.760 bytes
Resizing APFS Container designated by APFS Container Reference disk3
The specific APFS Physical Store being resized is disk2s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk2s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume MacOS - Daten was formatted by diskmanagementd (1412.141.1) and last modified by apfs_kext (1412.141.1)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
warning: apfs_fs_alloc_count is not valid (expected 372573, actual 27339438)
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by diskmanagementd (1412.141.1) and last modified by apfs_kext (1412.141.1)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (1412.141.1) and last modified by apfs_kext (1412.141.1)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by diskmanagementd (1412.141.1) and last modified by apfs_kext (1412.141.1)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume MacOS was formatted by diskmanagementd (1412.141.1) and last modified by apfs_kext (1412.141.1)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
warning: apfs_fs_alloc_count is not valid (expected 41959, actual 2746221)
Verifying allocated space
warning: overallocation detected on Main device: (0xd4794+2) bitmap address (0x11061)
Too many warnings of this type generated; suppressing subsequent ones
The volume /dev/disk2s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk2s2 from 160.000.000.000 to 449.999.998.976 bytes
Modifying partition map
Growing APFS data structures
Finished APFS operation

This will also work for shrinking the APFS container size.


NTFS

Mount Read/Write

By default MacOS is unable to write to NTFS partitions. To mount NTFS partitions in read/write mode, you may use NTFS-3G.

Install NTFS-3G via Homebrew (or in any other way you prefer) with the following command:

brew install ntfs-3g

After successfully installing NTFS-3G you can manually mount NTFS partitions in read/write with the following commands (replace /dev/disk1s1 with your actual NTFS partition):

# list all partitions to find the correct partition ID if needed
diskutil list

# unmount the partition if needed
sudo diskutil unmount /dev/disk1s1

# create a mount point if needed
sudo mkdir /Volumes/NTFS

# mount the NTFS partition
sudo /usr/local/bin/ntfs-3g /dev/disk1s1 /Volumes/NTFS -o local -o allow_other -o auto_xattr -o auto_cache

Now you should be able to find the mounted partition via the MacOS Finder.