Port 548 is the AFP (Apple Filing Protocol) port for macOS file sharing. AFP handles resource forks, Finder metadata, and Spotlight indexing that SMB cannot fully represent. Apple deprecated AFP in favor of SMB3 starting with macOS 10.9 – new deployments should use SMB on port 445.
Port Number
548
Protocol
TCP
Service
Apple Filing Protocol
Range
IANA Well-Known (0–1023)
macOS: list shares and check if AFP is enabled
sharing -l | grep -i afpEnumerate AFP shares on target (should fail if disabled)
nmap -p 548 --script afp-showmount targetCheck if AFP file server is listening
lsof -i :548macOS: read AFP server configuration
defaults read /Library/Preferences/com.apple.AppleFileServermount_afp afp://user@server/share /mnt
dscl . -read /Config/AFP
sharing -lAFP (Apple Filing Protocol) was created by Apple in 1986 for Macintosh file sharing over AppleTalk. It moved to TCP/IP (port 548) in Mac OS X (2001). AFP supported Mac-specific features: resource forks, Finder metadata, file locking. Apple deprecated AFP in macOS Ventura (2022) in favor of SMB3 which gained full Apple metadata support (SMB_AAPL extensions). Netatalk (open-source AFP for Linux) continues to maintain the protocol for NAS devices.
Should I still use AFP for Time Machine?
No. Since macOS Big Sur (11.0, 2020), Time Machine uses SMB by default. AFP Time Machine is legacy. For NAS: configure SMB shares as Time Machine destinations (fruit:time machine = yes in Samba's vfs_fruit module). For macOS server-to-server: use SMB. The only remaining AFP use case is connecting to very old Macs (pre-10.7) that don't support SMB2.
How do I migrate from AFP to SMB on a NAS?
Synology: Control Panel → File Services → disable AFP, ensure SMB is enabled with Maximum protocol = SMB3. QNAP: Control Panel → Network & File Services → disable AFP. Linux (Netatalk): stop netatalk service, configure Samba with fruit VFS module (vfs objects = fruit streams_xattr) to preserve Apple metadata. Remap clients to smb:// URLs. macOS Finder automatically falls back from afp:// to smb:// for most operations.