Google-chrome – Hosts file for Chromebook

chromebookgoogle-chrome-oshosts-file

Is there a way to modify the hosts file in Chrome OS?

­­/etc/hosts

The file is read only, so trying to modify it using sudo vim does not work.

I have read that disabling root filesystem verification would make editing the hosts file possible, but would also make you loose Chrome OS auto update.

­
sudo /usr/share/vboot/bin/make_dev_ssd.sh –remove_rootfs_verification –partitions 2

Is there any way to modify the hosts file without loosing automatic updates?

Thanks for your help.

EDIT: Just to specify, I am using an Acer C7 Chromebook with developer mode enable.

Best Answer

There are two options available:

1) Edit the hosts file from a Developer Chromebook:

sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 2

You will lose changes to the hosts file when ChromeOS does update again. Updates can be disabled by creating the file /mnt/stateful_partition/etc/lsb-release that contains the following 2 lines:

CHROMEOS_RELEASE_VERSION=9999.9999.9999.9999
GOOGLE_RELEASE=9999.9999.9999.9999

2) Using a Chrome extension

This topic is discussed thoroughly in this question: Simulate manipulation of the etc/hosts file in Google Chrome -- it is debated as to whether any of the extensions actually work the same as a hosts file modification.

Related Question