Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an NFS share which is shared across about two other machines. I recently realized that one of the servers isn't sharing the directory and is keeping files all for itself. Is there a way to see if the NFS share is mounted in the directory I think it is in?

share|improve this question
mount -l works ;) – Naftuli Tzvi Kay Sep 12 '11 at 21:16
up vote 5 down vote accepted

Maybe you are looking for

df .

When you are in the directory you want to know the mountpoint of?

share|improve this answer
+1 if you add mount -l to your answer ;) – Naftuli Tzvi Kay Sep 12 '11 at 21:17
@TK Kocheran The mount command is another way to find out, but then you probably should do "mount -l | grep XXX" so you filter the output a little, and still you may have ambiguous output (if you have dirs with similar names). The df command will tell you where the current dir is mounted and what type so there is not ambiguity in this method. But the result should be the same... – Johan Sep 13 '11 at 8:13

Straphka idea to use df will work well if you add some flags like the -T that shows filesystem type, (and maybe the -P for posix compability). And to top it off we can use awk to filter the output so we only print the type output column.

df -PTh . | awk '{print $2}'

or if you like to check up on a dir called smb/media/ in your homedir.

df -PTh ~/smb/media/ | awk '{print $2}'
share|improve this answer

You can use lsblk command as well.

Also, if you want to know things in detail:

$ df -T (file system type)
$ df -h (Humana readable format)

For your question mount -l is the answer as others have said.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.