|
23 | 23 | <link rel="apple-touch-icon" href="/favicon.ico"> |
24 | 24 | <link rel="stylesheet" href="/assets/css/site.css?v=b310d7c992"> |
25 | 25 | <link rel="stylesheet" href="/assets/css/main.css?v=ccd72260b9"> |
26 | | - <script type="application/ld+json">[{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Linux CLI", "description": "Reference for the droidspaces command line: every command, flag and config file key.", "url": "https://www.droidspaces.org/docs/linux-cli.html", "inLanguage": "en", "dateModified": "2026-10-06", "author": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "publisher": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "isPartOf": {"@type": "WebSite", "name": "Droidspaces", "url": "https://www.droidspaces.org/"}}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.droidspaces.org/"}, {"@type": "ListItem", "position": 2, "name": "Documentation", "item": "https://www.droidspaces.org/docs/"}, {"@type": "ListItem", "position": 3, "name": "Linux CLI", "item": "https://www.droidspaces.org/docs/linux-cli.html"}]}]</script> |
| 26 | + <script type="application/ld+json">[{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Linux CLI", "description": "Reference for the droidspaces command line: every command, flag and config file key.", "url": "https://www.droidspaces.org/docs/linux-cli.html", "inLanguage": "en", "dateModified": "2026-10-10", "author": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "publisher": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "isPartOf": {"@type": "WebSite", "name": "Droidspaces", "url": "https://www.droidspaces.org/"}}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.droidspaces.org/"}, {"@type": "ListItem", "position": 2, "name": "Documentation", "item": "https://www.droidspaces.org/docs/"}, {"@type": "ListItem", "position": 3, "name": "Linux CLI", "item": "https://www.droidspaces.org/docs/linux-cli.html"}]}]</script> |
27 | 27 | <script>(function(){const t=localStorage.getItem('theme');if(t)document.documentElement.setAttribute('data-theme',t);})();</script> |
28 | 28 | </head> |
29 | 29 | <body> |
@@ -246,7 +246,7 @@ <h3 id="networking">Networking <a class="header-anchor" href="#networking">#</a> |
246 | 246 | <tr> |
247 | 247 | <td><code>--net=MODE</code></td> |
248 | 248 | <td></td> |
249 | | -<td>Networking mode: <code>nat</code> (default), <code>host</code>, <code>none</code>, or <code>gateway</code>.</td> |
| 249 | +<td>Networking mode: <code>nat</code> (default), <code>host</code>, <code>none</code>, <code>gateway</code>, or <code>macvlan</code>.</td> |
250 | 250 | </tr> |
251 | 251 | <tr> |
252 | 252 | <td><code>--upstream=IFACE</code></td> |
@@ -303,6 +303,29 @@ <h4 id="gateway-mode">Gateway mode <a class="header-anchor" href="#gateway-mode" |
303 | 303 | </tr> |
304 | 304 | </tbody> |
305 | 305 | </table></div> |
| 306 | +<h4 id="macvlan-mode">Macvlan mode <a class="header-anchor" href="#macvlan-mode">#</a></h4> |
| 307 | +<p>Put a container straight onto a wired LAN through a host NIC, usually a USB Ethernet adapter. It gets its own MAC address on that LAN and its address from the LAN's DHCP server, with no NAT. Needs <code>CONFIG_MACVLAN</code> (see the <a href="kernel-configuration.html">Kernel configuration guide</a>). See <a href="features.html#5-macvlan-mode---netmacvlan">Features</a> for what it can and cannot do.</p> |
| 308 | +<div class="table-wrap"><table> |
| 309 | +<thead> |
| 310 | +<tr> |
| 311 | +<th>Option</th> |
| 312 | +<th>Short</th> |
| 313 | +<th>Description</th> |
| 314 | +</tr> |
| 315 | +</thead> |
| 316 | +<tbody> |
| 317 | +<tr> |
| 318 | +<td><code>--macvlan-parent=IF</code></td> |
| 319 | +<td></td> |
| 320 | +<td><strong>Required</strong> for <code>--net=macvlan</code>. The host NIC to attach to, for example <code>eth0</code>.</td> |
| 321 | +</tr> |
| 322 | +<tr> |
| 323 | +<td><code>--macvlan-mode=MODE</code></td> |
| 324 | +<td></td> |
| 325 | +<td><code>bridge</code> (default), <code>private</code>, <code>vepa</code> or <code>passthru</code>. In <code>bridge</code> mode containers on the same NIC reach each other directly.</td> |
| 326 | +</tr> |
| 327 | +</tbody> |
| 328 | +</table></div> |
306 | 329 | <h3 id="feature-flags">Feature flags <a class="header-anchor" href="#feature-flags">#</a></h3> |
307 | 330 | <div class="table-wrap"><table> |
308 | 331 | <thead> |
@@ -528,6 +551,11 @@ <h3 id="gateway-mode-lan-owned-by-openwrt">Gateway mode (LAN owned by OpenWRT) < |
528 | 551 | <span class="c1"># 2. a client whose LAN/DHCP/firewall is owned by openwrt</span> |
529 | 552 | sudo<span class="w"> </span>droidspaces<span class="w"> </span>--name<span class="o">=</span>kali<span class="w"> </span>--rootfs<span class="o">=</span>/data/kali<span class="w"> </span>--net<span class="o">=</span>gateway<span class="w"> </span>--gateway<span class="o">=</span>openwrt<span class="w"> </span>start |
530 | 553 | </code></pre></div> |
| 554 | +<h3 id="macvlan-mode-a-real-address-on-a-wired-lan">Macvlan mode (a real address on a wired LAN) <a class="header-anchor" href="#macvlan-mode-a-real-address-on-a-wired-lan">#</a></h3> |
| 555 | +<div class="code-block"><span class="code-lang">bash</span><button class="icon-button copy-btn" onclick="copyCode(this)" aria-label="Copy"><span class="icon" aria-hidden="true">content_copy</span></button><pre><code><span class="c1"># eth0 is the USB Ethernet adapter on the host; the container gets its own</span> |
| 556 | +<span class="c1"># MAC and asks the LAN's router for an address</span> |
| 557 | +sudo<span class="w"> </span>droidspaces<span class="w"> </span>--name<span class="o">=</span>ubuntu<span class="w"> </span>--rootfs<span class="o">=</span>/data/ubuntu<span class="w"> </span>--net<span class="o">=</span>macvlan<span class="w"> </span>--macvlan-parent<span class="o">=</span>eth0<span class="w"> </span>start |
| 558 | +</code></pre></div> |
531 | 559 | <h3 id="ephemeral-testing">Ephemeral testing <a class="header-anchor" href="#ephemeral-testing">#</a></h3> |
532 | 560 | <div class="code-block"><span class="code-lang">bash</span><button class="icon-button copy-btn" onclick="copyCode(this)" aria-label="Copy"><span class="icon" aria-hidden="true">content_copy</span></button><pre><code>sudo<span class="w"> </span>droidspaces<span class="w"> </span>--name<span class="o">=</span><span class="nb">test</span><span class="w"> </span>--rootfs<span class="o">=</span>/path/to/rootfs<span class="w"> </span>--volatile<span class="w"> </span>start |
533 | 561 | </code></pre></div> |
@@ -577,7 +605,7 @@ <h2 id="next-steps">Next steps <a class="header-anchor" href="#next-steps">#</a> |
577 | 605 | <nav class="doc-nav" aria-label="Pages"><a href="usage-android-app.html" class="doc-nav-prev"><small>Previous</small>Android app usage</a><a href="networking-from-zero.html" class="doc-nav-next"><small>Next</small>Networking from zero</a></nav> |
578 | 606 | </main> |
579 | 607 | <aside class="toc-column"> |
580 | | -<nav class="toc" aria-label="On this page"><p class="toc-title">On this page</p><ul><li class="toc-h2"><a href="#quick-navigation">Quick navigation</a></li><li class="toc-h2"><a href="#1-getting-started">1. Getting started</a></li><li class="toc-h3"><a href="#start-your-first-container">Start your first container</a></li><li class="toc-h3"><a href="#enter-the-container">Enter the container</a></li><li class="toc-h3"><a href="#stop-the-container">Stop the container</a></li><li class="toc-h2"><a href="#2-command-reference">2. Command reference</a></li><li class="toc-h2"><a href="#3-options--flags">3. Options & flags</a></li><li class="toc-h3"><a href="#rootfs-selection">Rootfs selection</a></li><li class="toc-h3"><a href="#container-identity--configuration">Container identity & configuration</a></li><li class="toc-h3"><a href="#networking">Networking</a></li><li class="toc-h3"><a href="#feature-flags">Feature flags</a></li><li class="toc-h3"><a href="#resource-limits">Resource limits</a></li><li class="toc-h3"><a href="#bind-mounts">Bind mounts</a></li><li class="toc-h2"><a href="#4-configuration-files">4. Configuration files</a></li><li class="toc-h2"><a href="#5-common-workflows">5. Common workflows</a></li><li class="toc-h3"><a href="#running-with-a-config-file">Running with a config file</a></li><li class="toc-h3"><a href="#persistent-development">Persistent development</a></li><li class="toc-h3"><a href="#nat-isolation-with-port-forwarding">NAT isolation with port forwarding</a></li><li class="toc-h3"><a href="#nat-with-a-pinned-uplink">NAT with a pinned uplink</a></li><li class="toc-h3"><a href="#gateway-mode-lan-owned-by-openwrt">Gateway mode (LAN owned by OpenWRT)</a></li><li class="toc-h3"><a href="#ephemeral-testing">Ephemeral testing</a></li><li class="toc-h3"><a href="#one-off-commands">One-off commands</a></li><li class="toc-h3"><a href="#gpu-acceleration">GPU acceleration</a></li><li class="toc-h3"><a href="#deep-customization-privileged-mode">Deep customization (privileged mode)</a></li><li class="toc-h2"><a href="#6-advanced-usage--lifecycle">6. Advanced usage & lifecycle</a></li><li class="toc-h3"><a href="#container-recovery">Container recovery</a></li><li class="toc-h2"><a href="#7-system-requirements">7. System requirements</a></li><li class="toc-h2"><a href="#next-steps">Next steps</a></li></ul></nav> |
| 608 | +<nav class="toc" aria-label="On this page"><p class="toc-title">On this page</p><ul><li class="toc-h2"><a href="#quick-navigation">Quick navigation</a></li><li class="toc-h2"><a href="#1-getting-started">1. Getting started</a></li><li class="toc-h3"><a href="#start-your-first-container">Start your first container</a></li><li class="toc-h3"><a href="#enter-the-container">Enter the container</a></li><li class="toc-h3"><a href="#stop-the-container">Stop the container</a></li><li class="toc-h2"><a href="#2-command-reference">2. Command reference</a></li><li class="toc-h2"><a href="#3-options--flags">3. Options & flags</a></li><li class="toc-h3"><a href="#rootfs-selection">Rootfs selection</a></li><li class="toc-h3"><a href="#container-identity--configuration">Container identity & configuration</a></li><li class="toc-h3"><a href="#networking">Networking</a></li><li class="toc-h3"><a href="#feature-flags">Feature flags</a></li><li class="toc-h3"><a href="#resource-limits">Resource limits</a></li><li class="toc-h3"><a href="#bind-mounts">Bind mounts</a></li><li class="toc-h2"><a href="#4-configuration-files">4. Configuration files</a></li><li class="toc-h2"><a href="#5-common-workflows">5. Common workflows</a></li><li class="toc-h3"><a href="#running-with-a-config-file">Running with a config file</a></li><li class="toc-h3"><a href="#persistent-development">Persistent development</a></li><li class="toc-h3"><a href="#nat-isolation-with-port-forwarding">NAT isolation with port forwarding</a></li><li class="toc-h3"><a href="#nat-with-a-pinned-uplink">NAT with a pinned uplink</a></li><li class="toc-h3"><a href="#gateway-mode-lan-owned-by-openwrt">Gateway mode (LAN owned by OpenWRT)</a></li><li class="toc-h3"><a href="#macvlan-mode-a-real-address-on-a-wired-lan">Macvlan mode (a real address on a wired LAN)</a></li><li class="toc-h3"><a href="#ephemeral-testing">Ephemeral testing</a></li><li class="toc-h3"><a href="#one-off-commands">One-off commands</a></li><li class="toc-h3"><a href="#gpu-acceleration">GPU acceleration</a></li><li class="toc-h3"><a href="#deep-customization-privileged-mode">Deep customization (privileged mode)</a></li><li class="toc-h2"><a href="#6-advanced-usage--lifecycle">6. Advanced usage & lifecycle</a></li><li class="toc-h3"><a href="#container-recovery">Container recovery</a></li><li class="toc-h2"><a href="#7-system-requirements">7. System requirements</a></li><li class="toc-h2"><a href="#next-steps">Next steps</a></li></ul></nav> |
581 | 609 | </aside> |
582 | 610 | <footer class="footer"> |
583 | 611 | <div class="footer-inner"> |
|
0 commit comments