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. LFD211 Introduction to Linux for Developers
    08 Dec » 09 Dec - Virtual
    Details
  2. LFS220 Linux System Administration
    08 Dec » 11 Dec - Virtual
    Details
  3. LFD331 Developing Linux Device Drivers
    15 Dec » 19 Dec - 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