nfs-utils
nfs-utils provides packages and binaries for NFS (Network File System) client and server support on Linux systems. It includes tools for mounting/unmounting NFS shares, managing exports, displaying statistics, and handling ID mapping.
Description
nfs-utils is a collection of packages and binaries essential for implementing NFS functionality on Kali Linux, supporting both client and server roles. The nfs-common package contains support files used on any machine acting as NFS client or server, including programs like lockd, statd, showmount, nfsstat, gssd, idmapd, and mount.nfs. The nfs-kernel-server package provides user-space support for the recommended Linux NFS kernel server, featuring NFSv3, NFSv4, Kerberos via GSS, and improved performance over user-space alternatives.
Use cases include setting up NFS servers for file sharing across networks, mounting remote NFS shares on clients, monitoring NFS statistics and performance, and managing NFS configurations and security features like ID mapping for NFSv4 names to local uids/gids. Tools cover mounting/unmounting, export management, statistics display, daemon control, and debugging for NFS operations.
The package supports advanced features like RPCSEC_GSS for secure authentication, client tracking in NFSv4, and kernel-level NFS server control, making it suitable for enterprise network file sharing environments requiring reliability and security.
How It Works
nfs-utils implements NFS protocols (v2, v3, v4) over RPC (Remote Procedure Call) for network file sharing. Client tools like mount.nfs and mount.nfs4 connect to NFS servers using RPC to mount remote filesystems locally, handling options for read-only/read-write, ID mapping via libnfsidmap (mapping NFSv4 user@domain to local uid/gid), and security via rpc.gssd (RPCSEC_GSS with Kerberos). Server-side, rpc.nfsd runs the NFS kernel server process, rpc.mountd handles mount requests, exportfs manages /etc/exports, and daemons like rpc.statd provide NSM (Network Status Monitor) for lock recovery. Statistics tools parse /proc/self/mountstats and kernel counters for per-mount NFS/RPC metrics. Configuration uses /etc/nfs.conf queried by nfsconf.
Installation
sudo apt install nfs-commonFlags
Examples
mount.nfs -hmount.nfs4 -hmountstats -hnfsconf -hnfsidmap -hnfsiostat -hnfsstat --helpshowmount -h