Skip to main content
Code And Run
Activities /

IP Address in bash script

06 June 2012
Linux

In linux you can get all of yours inferfaces IP with something like this:

sudo ifconfig   grep 'inet addr:' awk -F: '{ print $2}'  awk '{ print $1 }'

For example on my machine this command will output: