
I use an iPhone XS as my daily driver, and most of the time, the Personal Hotstpot connection from my iPhone doesn’t play well with my ElementaryOS WiFi, so I usually resort to just using the wired connection provided by my USB-A to Lightning cable from my iPhone to my PC. That’s more stable, and my phone gets to charge faster from the combination of the USB connection and reduced battery consumption from non-WiFi usage anyways, so it’s a win-win.
But today, I tried using this same “stable” wired connection to get to work as usual, but even though my iPhone showed the blue indicator at the top left corner of the screen to show that a Personal Hotspot connection has been established, this connection wasn’t recognized by my computer and I couldn’t access the internet. Connection over WiFi still worked fine when I tried it, so that indicated that the issue wasn’t with the general Network Interface on my computer, but with the wired connection.
Isolating Possible Causes
I’m both a software engineer and a tech enthusiast, so what I would usually do when I encounter issues like this is to isolate different possible causes of the issue till I narrow it down to a small list – or in lucky cases, one cause – and then try fixing that one or the several causes of the issue. I’ve already taken a step by establishing that the issue is not with the entire network interface on my OS, but with just the section related to the wired connection.
Could it be WingPanel?
Next, I tried manually turning the switch for the Wired Connection on. The thing is, the computer could still recognize the wired connection, even though I couldn’t use it to connect to the internet. But when I tried turning the switch on manually via WingPanel, WingPanel crashed and restarted immediately, and the switch still remained off. This kept happening no matter how many times I tried manually switching the connection on.

So at first, I thought it was an issue with WingPanel, so I set about doing a Google Search to see if others had experienced a similar issue with WingPanel and a Wired Connection on their ElementaryOS distros, but I caught myself while doing that; “why not try seeing if it’s even the wired connection causing WingPanel to crash, since other functions available on WingPanel don’t cause a crash when used?”, I asked myself.
Poor WingPanel
Okay then. So I opened the System Settings app, navigated to Network Settings, and tried manually switching the wired connection on. Guess what? The settings app crashed just as WingPanel did. Poor WingPanel…I had accused the innocent soul wrongly.?

With the WingPanel angle eliminated, I could then do a proper Google Search for this issue, and I landed on this AskUbuntu Forums answer, which helped me fix the issue.
The Fix.
Here’s what I did:
- Ran the following commands in the terminal, one after the other, while my iPhone was connected to my computer via USB:
sudo ifconfig eth0 up
sudo dhclient
- If the first command gives you the response:
ifconfig: command not found
, then run the commandsudo apt install net-tools
to install the package required to use ifconfig.

And Onto Valhalla, We March!
That’s all. The commands might seem short and you might be wondering if I’m trolling you, but hey, they worked for me, so try them out before passing judgement haha.
To be clear, I tried all of these out on my HP Envy 15 running Elementary OS Juno (5.0), and my iPhone XS. But it should also work for any Android device/smartphone having wired connection issues with any Ubuntu/Debian-based Linux distribution.
Side Note: As I was rounding up this post, I noticed that the connection stopped working after some time, and I had to keep restarting it from time to time (by turning the wired connection off manually and using the two commands above – ifconfig and dhclient – to turn it back on). Looks like my laptop just needs a restart, but I’ll keep an eye on it and update this article if something new comes up.
It’s quite uncommon for my perfectionist and pedantic ass to publish something without in-depth research and +-99% conviction, but if I don’t publish this now, I might never. So please, allow meeee.?
Say something about this