Welcome to the Linux Foundation Forum!
Restarting the wireless device
saqman2060
Posts: 777
in Ubuntu
I just started integrating ubuntu throughout my home network. Ubuntu holds up to it's reputation.
On one of the systems, I have a wireless nic that sometimes losses connection to my router. Usually if the router is the cause of the problem, you would fix the router and restart the computer's network controller. You can do the same in ubuntu by clicking on the network controller icon and select auto connect.
Is there a command that you can type in the terminal that will restart the controller, and also configure it?
![]()
0
Comments
-
You can restart networking with:
sudo /etc/init.d/networking restart
but that's not an interface specific command, it just restarts the whole thing. If you use the graphical network tool to manage your wireless interface, I know of no way to administer it from the command line. I would suggest migrating to a conf file based set up using /etc/network/interfaces.0 -
Thanks for the suggestions and the command.B)0
-
It sounds like router is freezing which depending on your security may require multiple steps to reconnect, such as interface authentication, security authentication and dhcp requests. Based upon the multiple steps restarting the networking service as Jinux suggested appears to be the best option. I recommend modifying your sudoers file to allow your normal user access to run the networking script as root without password authentication and creating a shortcut to run the command on your desktop.
Although you may want a script to auto-reconnect that concept can create problems by being stuck in a loop when you are not in range of the said router effectively knocking out any connections that you may have had setup, so based upon that logic I will not just give you a script or guide to accomplish the task, but if you are still interested I may work with you to make it a reality.0 -
If you can help me create a script that will automatically run to restart the wireless nic whenever connection is dropped, and terminate the script after a number of failed restarts, then I will oblige your assistance.0
-
Before we jump to a script I recommend you lookup instructions for using wicd instead of the ubuntu network manager, wicd has a clean option to automatically reconnect that has worked well for me.0
-
This is great, thanks!!!0
Categories
- All Categories
- 178 LFX Mentorship
- 178 LFX Mentorship: Linux Kernel
- 775 Linux Foundation IT Professional Programs
- 384 Cloud Engineer IT Professional Program
- 175 Advanced Cloud Engineer IT Professional Program
- 75 DevOps IT Professional Program - Discontinued
- 7 DevOps & GitOps IT Professional Program
- 103 Cloud Native Developer IT Professional Program
- 7.7K Training Courses & Learning Paths
- 13 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 35 Cloud & Containers Training
- 3 Cybersecurity Training
- 3 DevOps & Site-Reliability Training
- 2 Linux Kernel Development Training
- 2 Networking Training
- 2 Open Source Best Practice Training
- 5 System Administration Training
- 1 System Engineering Training
- 6 Web & Application Development Training
- 798 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 92 Storage
- 773 Linux Distributions
- 81 Debian
- 68 Fedora
- 24 Linux Mint
- 13 Mageia
- 24 openSUSE
- 151 Red Hat Enterprise
- 32 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 472 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 103 Linux Security
- 79 Network Management
- 102 System Management
- 46 Web Management
- 166 Mobile Computing
- 32 Android
- 119 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 407 Off Topic
- 128 Introductions
- 35 Study Material
- 1.1K Programming and Development
- 311 Kernel Development
- 723 Software Development
- 1K Software
- 418 Applications
- 183 Command Line
- 5 Compiling/Installing
- 71 Games
- 320 Installation
- Archived
- 183 Small Talk
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)