How to restart the network adapter

Lubuntu 21.04

I seem to keep losing my network adapter by accident whenever I look at the RJ icon in the bottom RH corner it seems to switch off the wired connector. How do I switch it back on?

I’m not sure what you’re really asking for, so I’ll provide some thoughts and hopefully one will help.

(1) The manual page on nm-tray can be found here - https://manual.lubuntu.me/stable/3/3.1/3.1.5/nm-tray.html

(2) you can restart the NetworkManager service using the command

systemctl restart NetworkManager

(you’ll be asked for password; or you can add a sudo in front where you’ll be asked in your terminal window instead)

(3) If you’re losing the nm-tray plugin, and my hope isn’t this is what you’re asking for, as if this is what you’re asking for it’s likely a symptom of an issue that if it was me, I’d explore first. Plugins should re-appear in logout/login again

It was (2) I wanted. Many thanks. Where did you find that? I don’t see it in the manual page you linked to.

All I found online were references to “network-manager” which is ‘close but no cigar’ and obviously did nothing. “network-manager” is for earlier versions or Ubuntu - I’m still not sure.

There are so many variants and out-of-date information out there that it’s very difficult for a beginner!

The network adapter was switching off; no lights on the RJ socket. Sometimes I could get it back by rebooting, sometimes by pulling the power and removing the battery (it’s a laptop) but on one occasion nothing worked and I resorted to re-installing lubuntu! I had already resoldered all the pins on the RJ socket and the adjacent chips, thinking this might be an intermittent hardware fault.

I wouldn’t have looked for that command in the manual (the manual is more for GUI users, but contains a wealth of information beyond that too).

For me it was mostly generic GNU/Linux knowledge… I don’t adjust well to change so I had to stop myself using sudo service (and use the the modern/systemd systemctl) when replying to you… but I know it’s NetworkManager for desktop products of Ubuntu.

If you used the older form of the command it’d work too, but for FYI purposes the older pre-systemd format of command was

sudo service NetworkManager restart

yes I knew to use sudo and “sudo systemctl restart NetworkManager” works fine.

As I said I could only find references to “network-manager” not “NetworkManager” .

Any idea which is used where? …and where is it documented?

I can’t provide definitive answers, but I’ll give a clue as to what I do.

When looking for something online, I tend to stick at first to official searches, ie. if wanting to search for “networking”, my first search would be.

networking site:*.ubuntu.com

My point here is I limit myself to Ubuntu specific sites before going wider if I need to. I don’t use google for searches, but my search engine didn’t show NetworkManager - Community Help Wiki in the first page but I’d have hoped I’d find it.

When you get to a Ubuntu wiki page like the one I just provided (on NetworkManager); I tend to jump bottom right of the page and for that page I’ll note it reports

NetworkManager (last edited 2020-05-06 00:03:38 by…

That date gives me a clue on when it was last looked at by someone (sure I can look at Page History for more, but the date gives a reasonable quick clue). Sure editors like myself tend to fix a single issue (rather than review the whole page) so it’s not definitive, but it’s a start.

If I don’t find what I’m looking for with just Ubuntu - then I tend to go wider; at first that means including Debian generally for me, generic GNU/Linux next.

Non Ubuntu bloggers often have a writing style that’s easier, more entertaining to read - but I stick to official stuff as it’ll have been scanned for accuracy. Many Debian pages will say the same thing, but be written by different people; so quickly reading that as a second source can be useful to ensure I didn’t miss anything. Yes differences will occasionally mean Ubuntu & Debian do things differently; by there will always be exceptions.

FYI: A search using my method

site:*.ubuntu.com network-manager

will pull up the wiki page I provided, along with other results.

Yes this is what I find most confusing :slight_smile:

To install NetworkManager:
sudo apt-get install network-manager

same with samba, you install samba but stop start and status calling smbd !?!
and apache: you install apache2 but call a stop. etc. with apache.

Very bad potty training in my book!!!

1 Like

Program standards (samba, NM etc) are set by the team that created them, what standards they follow is up to them, thus we have unix commands with no hyphen for options, hyphen for options, and gnu commands with double-hyphen before option.

Programs are not the same as packages; so whilst effort is made to make the name of the package resemble the program packaged within it - following packaging rules is far more important. Packagers need to ensure the package gets updated when it needs to etc - that is the focus of packagers (ie. where it should be).

To expect a package to have an identical name to the program inside it maybe a wish/ideal; but it will lead to other worse issues when clashes occur so it’s not something you should expect (what if two very different programs got given the same name; there are so many programs out there this isn’t as rare as you’d hope).

GNU/Linux is open source - so has no governing body can make a ruling & tell a team their name has to change. Ubuntu tends to use package names that match it’s upstream Debian where possible; but package names should not be expected to be identical to the application inside.

FYI: smbd - samba daemon; the d tells you it’s intended to be run as a daemon, or in a background/server role. ending in a ‘d’ is a unix standard for programs that are run that way; SMB is the small message block original name; the 2x’a’ being added later to make it easier to say & hear as a word

2 Likes

Thanks very much for taking the time to explain the background. Very useful.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.