FahamLah

Commands

getent hosts

getent hosts <name>

Risk: Safe

What it does

Turns a name into a number the way programs do: /etc/hosts first, then DNS.

When to use it

To check what curl or a browser will really dial.

Example

$ getent hosts kedai.example

Print its number, or nothing (exit 2).