Skip to content

Instantly share code, notes, and snippets.

@siliconmeadow
Created June 8, 2016 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siliconmeadow/5a288178ce98df35528d544e9e51874d to your computer and use it in GitHub Desktop.
Save siliconmeadow/5a288178ce98df35528d544e9e51874d to your computer and use it in GitHub Desktop.
#!/bin/bash
vbox_interfaces=($(/sbin/ifconfig | grep -o 'vboxnet[0-9]\+'))
for interface in ${vbox_interfaces[@]}
do
echo "Restarting ${interface}"
sudo ifconfig $interface down
sudo ifconfig $interface up
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment