Skip to content

Ubuntu - restart wifi connection without rebooting

Restarting a wifi connection without rebooting

I have a Mythbuntu box who's only connection to the outside world is through a wi-fi connection. It can be frustrating when the connection drops out at a critical time - during an upgrade to the next LTS release for instance. Here are some things to try to reset the connection.

 

sudo ifconfig

will tell you whether the adapter has an ip address allocated

dmesg | tail

might shed some light on what caused the connection to drop

sudo dhclient -v wlan0

dhclient will request a new dhcp lease, if your network adapter is configured to use dhcp. This worked for me, although it took some time. AFAIK, dhclient will keep on trying to acquire an ip address until it gets one or Ctrl + C is pressed. It might take a few minutes to succeed!

Other things to try

If the above doesn't work, you could try the following:

nmcli networking off 
nmcli networking on

restart network-manager:

sudo service network-manager restart

reload the kernel wifi module:

sudo rmmod iwlwifi
sudo modprobe iwlwifi

The module name will depend on the wifi hardware installed. To find out the module name try either of these commands:

lspci | grep -i network

or

sudo lshw -C network

and look for a line containing driver=something

*-network
   description: Wireless interface
   product: Wireless 7260
   configuration: driver=iwlwifi latency=0

Hopefully one of these methods will work. Otherwise check out these resources:

AskUbuntu

Stephen Ostermiller's Blog

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options