Code And Run

IP Address in bash script

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 }'
sudo ifconfig ย  grep 'inet addr:' awk -F: '{ print $2}'  awk '{ print $1 }'

For example on my machine this command will output:

Alex
Alex
@alex@www.codeandrun.it

๐Ÿƒ๐Ÿปโ€โ™‚๏ธ Marathoner | ๐Ÿ’ป CTO @intre_scrumteam | ๐Ÿ“ฑ tech addicted

674 posts
0 followers

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *