6

Many times my network adapter just stops working, the only option is to reboot anyway.Is there a way to reset network adapter in a session so I won't have to reboot my computer many times?

5
  • Can you clarify your question? Do you need to reset your wi-fi or ethernet card? Is your wi-fi (card) (I am not sure there is such a thing as wifi card) or all of your networking not working? e.g. if you try to connect with ethernet cable can you be able to connect or all internet connections etc. are not working? I am not only saying this so you can get your answer quicker also in future people with similar problems can find this page easier and find the solution easier hopefully.
    – mtilhan
    Sep 25, 2015 at 15:03
  • Also consider disabling power saving on your Wi-Fi device. Post another question with the output of lshw -c network if you need help with this.
    – elmato
    Sep 26, 2015 at 9:44
  • I would like to reset my WiFi card. I have an external WiFi card(USB one). Sep 26, 2015 at 19:46
  • Are you using a Lenovo laptop by any chance?
    – shyam
    Sep 29, 2015 at 9:57
  • @personinsack, did you ever resolve this issue?
    – wolf
    Oct 1, 2016 at 21:56

2 Answers 2

3

There is an answer that may work for you:

If you really want to reset the network adapter you usually need to unload and reload the kernel module that it uses.

If you just want to reconfigure it you can usually do:

sudo /etc/init.d/network-manager restart

But if you just want a new dhcp lease (that's the technical name for obtain a new IP from the router), you just need to use:

sudo dhclient -v eth1

Source: https://askubuntu.com/questions/54710/how-do-i-reset-the-network-adapter-using-a-terminal-command

2
2

I use this command and it works just fine for me:

sudo service network-manager restart

I use it to restart wifi whenever it stops working (it was much more of an issue after new release of Ubuntu/Xubuntu 16.04, in Loki it's much more stable for me so I use it very little, usually after many suspends).

5
  • sudo systemctl restart network-manager will also work.
    – hlongmore
    Mar 15 at 17:04
  • probably.. I no longer have such issues on any machine, so i can't help to test it..
    – jena
    Mar 15 at 18:00
  • It's been a while since I upgraded my personal laptop, so if it was fixed or improved, I don't have that improvement. The command I posted is what I used. Three times today (maybe it's time to upgrade).
    – hlongmore
    Mar 16 at 0:40
  • some improvements are expected after 6 years since the answer was posted, but the issue may as well depend on hardware, drivers, and such.. my current slimbook laptop came with elementary OS preinstalled, so probably I should have few such issues to begin with.. I recommend posting a new question with details of your system, if you want some help with it (you can link this page in your question)..
    – jena
    Mar 17 at 10:28
  • One wonders what the appropriate commands are for Elementary OS 7 (Horus). Neither service network-manager restart (ancient init.dmethod) nor systemctl restart network-manager (under modern systemd) exist any longer. There is a unit called NetworkManager, but restarting it won't produce any significative changes — I believe it only affects the network icon on the top bar. Jun 8 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.