Toolman

What port does NFS use?

NFS uses port 2049 over TCP/UDP.

PortProtocolNameWhat it is for
2049TCP/UDPNFSNetwork File System — Unix file sharing.

Exposing it

Traditional NFS trusts client-supplied user IDs. Use NFSv4 with Kerberos, or keep it on a trusted network.

Checking it is listening

sudo lsof -i :2049          # macOS, Linux
netstat -ano | findstr :2049   # Windows
nc -zv host 2049               # from elsewhere

An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.

Frequently asked questions

What port does NFS use?

NFS uses port 2049 over TCP/UDP. Network File System — Unix file sharing.

Is port 2049 safe to expose to the internet?

Traditional NFS trusts client-supplied user IDs. Use NFSv4 with Kerberos, or keep it on a trusted network.

How do I check whether NFS is listening?

sudo lsof -i :2049 on macOS or Linux, netstat -ano | findstr :2049 on Windows. From another machine, nc -zv host 2049 says whether anything answers.

Other services

Port 2049 in full · Every service · All port numbers