Linux Tip | Refresh Network Connections with a Command – YouTube

 

This video shows you hot to refresh network/internet connections.

Refresh Network Connections Script

Commands

For Upstart: sudo service network-manager restart

For systemd: sudo systemctl restart network-manager

Create a script to run this command with one click:

nano refresh-net

Add to file:

#!/bin/bash

# Refresh network connections

sudo service network-manager restart
sleep 5
exit

Ctrl+o saves file.

Make the file executable:

chmod +x refresh-net

Move to /bin:

sudo mv refresh-net /bin/

Leave a comment