You can use dig command as well.
# dig
www.google.com
; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7 <<>>
www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16138
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;
www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 149 IN A 172.217.12.196
;; Query time: 9 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Nov 04 17:11:09 IST 2017
;; MSG SIZE rcvd: 59