What filesystem mount point am I currently working on

commanddirectorydirectory-structurefilesystems

I would like to know in what filesystem mount point I am currently on, similarly to using pwd to know what directory I am in.

I know you can use df . (or df $(pwd) or many variants), but I find it somehow overkilling to check the file system usage just to know where I am.

So: is there any command showing in what filesystem mount point I am?

Best Answer

I think df . is your best bet. The filesystem usage check is not that expensive (it doesn't have to count any blocks on disk, that information is readily available and stored in memory once the filesystem is mounted).

Alternatives like comparing the current path against mount points by using a script would be more expensive.