OSX Reference
Contents
OSX Reference¶
Notes, recipes, and useful snippets relating to all things OSX.
Table of Contents¶
Mounting Linux filesystems¶
MacFUSE, previously OSXFUSE, provides third party support for linux file systems.
To mount an ext4 filesystems on mac, we first install
brew install macfuse ext4fuse
Installing ext4fuse
may be disabled, as per this SO answer. The solution is to edit the formula location
brew formula ext4fuse
and comment out the lines
# on_macos do
# disable! date: "2021-04-08", because: "requires FUSE"
# end
NB: for ext2, or other, search in brew for the FUSE support.
We can then mount the drive with
sudo ext4fuse -o allow_other /dev/disk2s2 /path/to/mnt
The drive may be unmounted again with
diskutil unmountDisk /dev/disk2
or
sudo umount /path/to/mnt
Changing hostnames¶
Use scutil
, a program from managing system configuration parameters.
To change primary hostname
sudo scutil --set HostName [hostname]
Bonjour hostname:
sudo scutil --set LocalHostName [hostname]
Computer name
sudo scutil --set ComputerName [hostname]
Then flush the DNS cache with
dscacheutil -flushcache
and reboot.
Useful fixes¶
### Flushing DNS
sudo killall -HUP mDNSResponder
sending -HUP
for “hangup” to request stopping and re-starting. For more on signal codes, see this SE answer.