> For the complete documentation index, see [llms.txt](https://0xpthree.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://0xpthree.gitbook.io/notes/development/linux/netplan-+-networkd.md).

# Netplan + Networkd

Change from default (in Kali) NetworkManager to Netplan + Networkd.&#x20;

```bash
» sudo apt install netplan.io
» sudo apt purge network-manager
» sudo apt purge ifupdown
» sudo vim /etc/netplan/01-netcfg.yaml
» sudo systemctl enable systemd-networkd
» systemctl start systemd-networkd
» sudo netplan apply

# Reboot if changes doesnt apply
» reboot
```

```bash
# Example config
» cat /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: true
    eth1:
      dhcp4: false
      dhcp6: false
      addresses:
      - 192.168.1.111/24
      routes:
      - to: default
        via: 192.168.1.1
      nameservers:
       addresses: [192.168.1.1,8.8.4.4]
```

{% hint style="warning" %}
**NOTE:**&#x20;

You must adhere to a correct code indent for each line of the block. Otherwise you may end up with an error message similar to:&#x20;

`Invalid YAML at /etc/netplan/01-netcfg.yaml:4:14: Invalid YAML: inconsistent indentation:`
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://0xpthree.gitbook.io/notes/development/linux/netplan-+-networkd.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
