How to see file systems that are mounted read-only?

Use the lsblk tool to show information about block devices, such as disks and partitions. By filtering on the RO field, it is possible to show only those file systems that are mounted read-only. This might be useful for troubleshooting purposes or to confirm a file system is correctly mounted.

Examples

lsblk --output MOUNTPOINT,RO | awk '{if ($2==1) {print $1 }}'

Sample output

/mnt/test

Recently updated at May 8, 2023

Do you like this page? Share it with others or help us make it better

Yes!

Share with friends:
Share on Twitter