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

683 articoli
0 follower

Comments

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *