# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
