re: Command for Local IP Address VIEW POST

FULL DISCUSSION
 

this will work if you your device is not eth0

ip addr show enp1s0 | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/'

prints out all connected devices ip addresses

ifconfig | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/'
code of conduct - report abuse