Resolve a name, and resolve an address back to a name
Resolve a name, and resolve an address back to a name
Answer
getent hosts www.example.org host www.example.org host 127.0.0.1
getent goes through the same resolver the applications use, so it obeys /etc/hosts as well as DNS. host queries DNS directly, in both directions.
S&K 3e ch11 §11.2–11.5