get ip terminal code example
Example 1: show ip address linux
$ hostname -I
Example 2: linux check ip address command
ifconfig -a
Example 3: IP adress terminal
# when you're on your terminal Window :
ipconfig
# on macOS :
ifconfig | grep "inet" | grep -v 127.0.0.1
# on Linux :
hostname -I
Example 4: get ip address linux
curl ifconfig.me
Example 5: get your ip address from terminal
for local ip :
hostname -I
for Public ip :
curl icanhazip.com