brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: scutil --get shows the three names your macos machine uses on the network

macOS
~/tips/tip-macos-scutil-get-hostnames

scutil --get ComputerName

Prints the computer name, Bonjour name and hostname that macOS keeps separately.

A Mac has more than one name, and they do not have to match. That explains odd hostnames in SSH and on the network.

scutil --get ComputerName
scutil --get LocalHostName
scutil --get HostName

ComputerName is the friendly name from Settings, LocalHostName is the Bonjour name you reach as name.local, and HostName is the one the shell and DNS tools may use. HostName is often unset, and the command then exits with an error.

Set one with sudo scutil --set LocalHostName mac-studio. Local names may only contain letters, digits and hyphens.

Further reading: scutil manual page

More macOS tips System Settings > Accessibility > Hover Text > When using the pointer A Smart Folder in Notes collects notes by tag, checklist or date Type # in a Mac note to tag it, then filter by tag in the sidebar tmutil isexcluded ~/Projects/app/node_modules Crop an image in Preview by dragging a frame and clicking Crop All macOS tips (99) All topics

Link