Mmm. Unless your /etc/hosts is wide open or your shell is running as root, you got something like
-bash: /etc/hosts: Permission denied