Linux.com

Home Linux Community Community Blogs General Linux Simple scripting to save your Wifi connection

Simple scripting to save your Wifi connection

Wireless device support and stability have come a long way in Linux since i started using Ubuntu a few years ago.

Now and again though, something can happen to make you lose your wireless connection.  Many people solve this by restarting network manager or by simply restarting the computer.  

With a small script file, you can restart your wireless driver when its on the fritz, quicly and easily.

First create a file: 

gksudo gedit /usr/local/bin/name-of-file

Then add the script code:

#!/bin/bash

modprobe -r your-wireless-device
modprobe your-wireless-device

Save and close your file and give permissions to run it:

sudo chmod +x /usr/local/bin/name-of-file

Finall, run the script by typing in the terminal:

sudo name-of-file

 

Hope this helps some people, not only with keeping you wifi going strong, but also with how to implement simple scripts to make computing easier and funner.

 

-GL

 

 

Comments

Subscribe to Comments Feed

Upcoming Linux Foundation Courses

  1. LFD320 Linux Kernel Internals and Debugging
    03 Nov » 07 Nov - Virtual
    Details
  2. LFS416 Linux Security
    03 Nov » 06 Nov - Virtual
    Details
  3. LFS426 Linux Performance Tuning
    10 Nov » 13 Nov - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board