Jump to content

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


Recommended Posts

Posted

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.

Posted

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
my_connection
# nano -w my_connection

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

 

Posted

I accidentally took the tick off Enable Networking when I wanted to take the tick off Enable Wi-Fi.  I guess the question is what does the GUI do in the background to enable and disable networking.

 

1442330408_Screenshot2021-09-22091509.png.bcb5859a1b2ce00ffb42f3ef05b6f0fb.png

Posted

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.

Posted

It does look like nmcli.  I thought maybe the interfaces were brought down and configured somewhere to stay down using ifconfig.  Now I have to study nmcli which I didn't know about.  I certainly will ask at the xfce forum.

Thank-you.

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
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.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines