Fix: sudo: unable to open Read-only file system

Error:
$ sudo vim /etc/20230712_app_server.log

[sudo] password for user: 

sudo: unable to open '/etc/20230712_app_server.log' Read-only file system

You need to first check if the mount status is not read-only.

# mount | grep /etc

/dev/sda1 on /etc type ext4 (ro,relatime)

As you can see the mount is read-only!

Solution: In this case you can remount the filesystem.

# sudo mount -o remount,rw /dev/sda1 /etc
Fix - sudo- unable to open Read-only file system

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!