> For the complete documentation index, see [llms.txt](https://security.musana.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://security.musana.net/linux/static-ip.md).

# Static IP

Edit the `/etc/dhcpcd.conf` file.

```
interface wlan0
static ip_address=192.168.0.99
static routers=192.168.0.1
static domain_name_servers=1.1.1.1
```

### DHCP

Edit the `/etc/network/interfaces` file.

```
auto eth0*
iface eth0 inet dhcp

# * your interface.
```
