# Linux Kernel Module Cheat

##### 15.3.1.1. nc host to guest

With `nc` we can create the most minimal example possible as a sanity check.

On guest run:

    nc -l -p 45455

Then on host run:

    echo asdf | nc localhost 45455

`asdf` appears on the guest.

This uses:

- BusyBox' `nc` utility, which is enabled with `CONFIG_NC=y`

- `nc` from the `netcat-openbsd` package on an Ubuntu 18.04 host

Only this specific port works by default since we have forwarded it on the QEMU command line.

We us this exact procedure to connect to gdbserver.