Created
June 8, 2016 16:55
-
-
Save siliconmeadow/5a288178ce98df35528d544e9e51874d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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