Answers for "linux terminal get ip from hostname"

20

display ip address linux

#private ip
hostname -I
or
ifconfig
or
ip addr show

#public ip
curl ifconfig.me
Posted by: Guest on December-02-2020
0

get ip address for domain in shell

$ host stackoverflow.com

stackoverflow.com has address 69.59.196.211
stackoverflow.com mail is handled by 30 alt2.aspmx.l.google.com.
stackoverflow.com mail is handled by 40 aspmx2.googlemail.com.
stackoverflow.com mail is handled by 50 aspmx3.googlemail.com.
stackoverflow.com mail is handled by 10 aspmx.l.google.com.
stackoverflow.com mail is handled by 20 alt1.aspmx.l.google.com.
Posted by: Guest on February-18-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language