Tuesday, October 21, 2008

How to edit a read-only file (eg. /etc/hosts)

You do not need to change the access rights in /etc/inet/hosts
Logged in as root, the file is read only, but since you are root, you can make changes to the file. Just make sure when you get done editing the file (yes it shows up as read only, but don’t let that fool you)
you type
You are forcing an over write of the file.
Remember as root/su you have rights to everything, so make sure that you do not make a mistake. Always make a backup of what you are working on before you make the changes.

No comments: