The mount command connects storage devices or file systems (like EXT4, NTFS, or FAT32) to directories known as mount points. Once mounted, everything inside that mount point reflects the contents of the attached storage. As a pentester testing from either Kali, Parrot, or another security-focused distro (99% of the time Linux-based) you will use mount very often to attach open file shares or other storage.

Mount

Use the following to mount NFS shares. Network File System (NFS), a protocol commonly used for sharing files between Linux/Unix systems over a network.

sudo mount -t nfs 10.1.1.1:/dir/file /home/mrnobody/Desktop/testing            #Mounts a NFS share volume called file on a remote system to a folder called testing on your local system
sudo mount -t nfs 10.1.1.1:/homedirs/administrator /root/testing -o nolock

Unmount

Use the following to unmount NFS shares

sudo unmount /home/mrnobody/Desktop/testing

Mount a Windows share drive on Linux

Use the following to mount CIFS shares. If you are connecting to a Windows Server, a Windows desktop share, or a consumer NAS device, you need to log in with a username and password. CIFS is best used for Windows-to-Windows or Linux-to-Windows.

mount -t cifs //10.1.1.1/NETLOGON /root/mount/ -o username=admin,domain=domain.local    #Enter usernames password when prompted

Unmount all CIFS shares

Use the following to unmount all CIFS shares.

sudo umount -a -t cifs -l