<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Raspberry Pi | no dogma blog</title><link>https://nodogmablog.bryanhogan.net/tag/raspberry-pi/</link><atom:link href="https://nodogmablog.bryanhogan.net/tag/raspberry-pi/index.xml" rel="self" type="application/rss+xml"/><description>Raspberry Pi</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Wed, 04 Nov 2026 00:00:00 +0000</lastBuildDate><image><url>https://nodogmablog.bryanhogan.net/media/icon_hu9c23d68d4e9f1f9acfa8237e5c2ea674_3344_512x512_fill_lanczos_center_3.png</url><title>Raspberry Pi</title><link>https://nodogmablog.bryanhogan.net/tag/raspberry-pi/</link></image><item><title>Sharing Internet Access from a Ubuntu Laptop to a Raspberry Pi</title><link>https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/</link><pubDate>Wed, 04 Nov 2026 00:00:00 +0000</pubDate><guid>https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/</guid><description>&lt;p>&lt;em>This and the next post are going to be almost identical because the one technique achieves two distinct goals, and I want each title to reflect just one goal.&lt;/em>&lt;/p>
&lt;p>&lt;em>In this, I will show how to share a laptop&amp;rsquo;s internet with the Pi. In the next post, I will show how to ssh to the Pi from a laptop if you have no monitor, keyboard, or shared network.&lt;/em>&lt;/p>
&lt;p>I recently got a Raspberry Pi 4, and sometimes I&amp;rsquo;m out and about with it and my laptop. If I want to SSH into the Pi, a few things have to align -&lt;/p>
&lt;ul>
&lt;li>the laptop and the Pi need to be on the same wifi network&lt;/li>
&lt;li>that wifi network needs to allow communication between devices&lt;/li>
&lt;li>the Pi needs to be authenticated with the wifi network, but I don&amp;rsquo;t have a monitor or keyboard with me.&lt;/li>
&lt;/ul>
&lt;p>If I connect the Pi to my laptop with an Ethernet cable, then I can &lt;code>ssh&lt;/code> to the Pi and work with it. A happy side effect is that the Pi will have internet access, too, using my laptop&amp;rsquo;s wifi connection - my laptop becoming a router for the Pi.&lt;/p>
&lt;h2 id="my-setup">My Setup&lt;/h2>
&lt;p>I have -&lt;/p>
&lt;ul>
&lt;li>Ubuntu on my laptop&lt;/li>
&lt;li>Raspberry Pi 4 with the 64-bit Lite OS&lt;/li>
&lt;li>an Ethernet cable connecting the two devices&lt;/li>
&lt;/ul>
&lt;h2 id="sharing-internet-from-laptop-to-raspberry-pi">Sharing Internet from Laptop to Raspberry Pi&lt;/h2>
&lt;p>Plug the cable into the laptop and the Pi. It doesn&amp;rsquo;t have to be a crossover cable, a regular Ethernet cable will work.&lt;/p>
&lt;h3 id="1-the-ethernet-connection">1. The Ethernet Connection&lt;/h3>
&lt;p>Go to Settings → Network.&lt;/p>
&lt;p>There might be a few sections, the top one is probably the one you need. It might be called Wired, Ethernet, PCI Ethernet, or something similar.&lt;/p>
&lt;figure id="figure-network-connections">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Network Connections" srcset="
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_139f90d2b2f3249a027d1318a260579e.webp 400w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_b24bdb3d3fe89d113f5fed4a3c2dec8a.webp 760w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/Connections_huea9c1f14481a1dcd937118a2052bcff4_18262_139f90d2b2f3249a027d1318a260579e.webp"
width="760"
height="139"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Network Connections
&lt;/figcaption>&lt;/figure>
&lt;h3 id="2-changing-the-profile">2. Changing the Profile&lt;/h3>
&lt;p>Click the gear icon to edit the profile, move to the IPv4 tab, and change the method to &lt;strong>Shared to other computers&lt;/strong>. Click Apply.&lt;/p>
&lt;figure id="figure-sharing-the-connection">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Sharing the connection" srcset="
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_b33446b6ced11d8b09a6630701753d1e.webp 400w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_f2ae0e0efb0991f14280ceed2c8a2b39.webp 760w,
/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://nodogmablog.bryanhogan.net/2026/11/sharing-internet-access-from-a-ubuntu-laptop-to-a-raspberry-pi/media/IPv4_hubee3e9f7ff883ac0310ae1799e80e386_43289_b33446b6ced11d8b09a6630701753d1e.webp"
width="760"
height="504"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Sharing the connection
&lt;/figcaption>&lt;/figure>
&lt;h3 id="3-connecting-the-laptop-and-the-pi">3. Connecting the Laptop and the Pi&lt;/h3>
&lt;p>Plug the cable into the laptop and the Pi. The Pi should get an IP address from the laptop.&lt;/p>
&lt;h3 id="4-finding-the-pis-ip-address">4. Finding the Pi&amp;rsquo;s IP Address&lt;/h3>
&lt;p>I know the name of my Pi is &lt;code>pi4&lt;/code>, so I can ping it at &lt;code>pi4.local&lt;/code> to see its IP address -&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ping -c1 pi4.local&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>If I forgot the name of my Pi, I can check the address the laptop handed out over the cable:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">sudo cat /var/lib/NetworkManager/dnsmasq-*.leases&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>This will show something like -&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">1793837033 xx:xx:xx:xx:xx:xx 10.42.0.23 pi4 yy:yy:yy:yy:yy:yy:yy&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>The IP address is in the middle of the line.&lt;/p>
&lt;h3 id="5-ssh-into-the-pi">5. SSH into the Pi&lt;/h3>
&lt;p>I can &lt;code>ssh&lt;/code> to the Pi using the name or the IP address -
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-cfg" data-lang="cfg">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ssh pi4.local&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#888;font-style:italic"># or &lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000">ssh 10.42.0.23&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/p>
&lt;p>The Pi should now have internet access.&lt;/p>
&lt;p>From the Pi, try pinging &lt;code>9.9.9.9&lt;/code> and &lt;code>quad9.com&lt;/code> to verify that the Pi has internet and DNS access.&lt;/p>
&lt;h3 id="6-resetting-the-profile">6. Resetting the profile&lt;/h3>
&lt;p>After you disconnect the Pi, change the profile back to the original method (probably &lt;code>Automatic (DHCP)&lt;/code>), so that when you plug the laptop into a router, it gets an IP address from the router.&lt;/p>
&lt;h2 id="future-posts">Future posts&lt;/h2>
&lt;ol>
&lt;li>
&lt;p>I will cover how to do the above when the laptop is running a VPN.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Having to change the profile manually each time is a bit of a pain. But it is possible to set up multiple profiles for the same interface and have the laptop pick the right one by itself.&lt;/p>
&lt;/li>
&lt;/ol></description></item></channel></rss>