1

My terminal IDE accessed root but cannot edit hosts file.

[email protected]:/system/etc #vim hosts

But vim just opens hosts file as readonly. Where do I missed here?

vusan
  • 123
  • 7

1 Answers1

2

You've missed that the /system file system is mounted read-only.

mount -o remount,rw /system
cd /system/etc
vim hosts
# edit, save, then make /system read-only again:
mount -o remount,ro /system
Izzy
  • 91,166
  • 73
  • 343
  • 943