mount: mount a filesystem, or list what is mounted
mount [-t TYPE] [DEVICE DIR]
Options you will use
--bind- Mount a directory (or file) at a second place too: mount --bind OLD NEW.
-a, --all- Mount everything in /etc/fstab that is not mounted yet. The way to test fstab without a reboot.
-o OPTIONS- Mount options: ro, rw, remount, noexec, nosuid...
-t TYPE- The file system type: ext4, xfs, nfs, tmpfs...
Examples
$ sudo mount -t efs -o tls,accesspoint=fsap-0123456789abcdef0 fs-0123456789abcdef0:/ /mnt/appmount through an EFS access point
Gotchas
- NFS (and Amazon EFS): sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-ID.efs.REGION.amazonaws.com:/ /mnt/efs - needs nfs-common (mount.nfs4). With amazon-efs-utils: sudo mount -t efs -o tls fs-ID:/ /mnt/efs (TLS through a local stunnel: mount then shows 127.0.0.1:/).
- An EFS mount that hangs then says "Connection timed out": the mount target's security group does not allow TCP 2049 from you (or there is no mount target in your AZ).
- An EFS mount that hangs, then "Connection timed out": the mount target's security group does not allow TCP 2049 from you.
Taught in
Try mount in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.