Jump to content

How do I turn on networking using bash commands if I've accidentally disabled networking within the GUI shell?


Recommended Posts

Yes, I managed to do this. Luckily I managed to re-enable the GDM3 graphical console on-start-up by using the debug serial port and then using the GUI through the TV to put the tick back to enable networking.  Yep, very much a noob mistake.

So, the question is when networking is disabled so eth0 and wlan0 disappear, leaving only lo, how do I get eth0 and wlan0 back just using the command line?  I can't easily find how to do this. I've looked, I've searched and now ....   help!  :-)


(I do also have the ability to put the MicroSD card into my laptop, so maybe it would be simpler to do that and change some configuration files to re-enable networking?)


This would be very useful information for anyone else who gets stuck in the same situation.

Link to comment
Share on other sites

Search Before Posting!

Unfortunately, it depends on what you did to disable networking?


By default, I think that networking services are managed by NetworkManager. You can check to see if the service is disabled with:


$ systemctl status NetworkManager 


If it's disabled, you can re-enable with:


$ sudo systemctl enable NetworkManager
$ sudo systemctl start NetworkManager


If you touched one of the network configurations, You can manually poke at the configs like this:


$ sudo -i
# cd /etc/NetworkManager/system-connections
# ls
# nano -w my_connection

<Hit Control-O, Enter, then Control-X when done>


Link to comment
Share on other sites

Took a quick look on my system doing that.


Doing "systemctl status", I don't see any obvious services that were started or stopped.


You might learn more reading up on the options in the NetworkManager command line tool:


$ man nmcli


Or check with the XFCE guys over at https://forum.xfce.org/ what exactly that network widget does.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...