Skip to content

Instantly share code, notes, and snippets.

@jetsup
Last active June 7, 2024 10:32
Show Gist options
  • Save jetsup/194f6c40974222df2f65769bbb3dd4aa to your computer and use it in GitHub Desktop.
Save jetsup/194f6c40974222df2f65769bbb3dd4aa to your computer and use it in GitHub Desktop.

Missing Ethernet in Ubuntu 24.04 on Raspberry Pi (5)

I was trying to ssh into Raspberry Pi 5 running the new Ubuntu 24.04 through ethernet when I realized that it was not blinking the ethernet led, as I am used to seeing it. But ssh through the WiFi was working just fine that I decided to run ifconfig command, then got this:

┌──(george㉿berry)-[~]
└─$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 114  bytes 9364 (9.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 114  bytes 9364 (9.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.39  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::da3a:ddff:feb0:2b64  prefixlen 64  scopeid 0x20<link>
        inet6 2c0f:6300:20a:9300:da3a:ddff:feb0:2b64  prefixlen 64  scopeid 0x0<global>
        ether d8:3a:dd:b0:2b:64  txqueuelen 1000  (Ethernet)
        RX packets 241  bytes 17409 (17.4 KB)
        RX errors 0  dropped 16  overruns 0  frame 0
        TX packets 74  bytes 13075 (13.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Ethernet, eth0 was not available. After some googling I came across this blog. In this gist, I am going to highlight the steps and commands that I followed and executed.

The command sudo dhclient -v makes eth0 be available when ifconfig is executed but disappears on reboot.

As per the blog, sudo crontab -e, opens the file /tmp/crontab.hAhh6J/crontab, on my machine. Then adding @reboot dhclient -v at the end of the file, makes eth0 available even after reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment