Recipe: 003-Direct Network

Recipe Card


003 : Direct Network Connection


Recipe Files Ingredients


For the markdown version of this recipe on the Pi-Kitchen GitHub site see:

003-Direct Network




This recipe places the direct network connection scripts on to the SD-Card.

See Super Easy Direct Network Connection.

The cmdline.txt allows you to specify the IP address of the Raspberry Pi on boot.

This allows you to setup an IP address suitable for a direct network link (using a single network cable to a PC or laptop).

The resulting connection is just like a normal network so you can share files using SMB and remote connect using SSH, as well as use X-Forwarding to remotely run graphical programs (or use VNC).

The direct connection IP address is set to

How to use


Enable/Disable by running sudo ./bin/



The ingredient files should be placed in the following location on the NOOBS RECOVERY partition:




This recipe uses the following files:





Plus the following files in the _SETTINGS folder:

It is assumed that the following file(s) are placed in the following location on the NOOBS RECOVERY partition:




You will need the following _SETTINGS file(s):




NOTE: Files which are configured manually or may contain sensitive information are placed in the _SETTTINGS directory on the SD-Card. This is so that it is easier to support different configurations and remove sensitive information from the setup if needed.

Perform the following actions:


Ensure you update cmdline.internet with the PC’s IP address as the gateway.


You can download all the ingredient files, and extracted directly to the NOOBS SD-Card (ensuring you remove the ZIP file’s name from the directory – the files should be extracted to pi-kitchen/003-direct-network).

The Recipe Files

Each recipe will use one file for each of the partitions it installs to – boot, root and data).

You will need to suitably rename or copy the content of each of the following files into your recipe files (i.e. RaspbianPiKitchen_root.txt) and place them in your os folder in the NOOBS partition (i.e. os/Raspbian).

For more information see the Pi-Kitchen: Creating Flavours guide.



#Recipe: 001-direct-network

#Configure the boot settings:

#-- Only one cmdline.txt file should be applied at any one time (only comment one out)

#- Direct network settings - for direct connections with a PC using just a network cable


#- Normal network settings - for normal use with a standard home network


#- Internet Connection Sharing requires specific settings for you own network so stored in _SETTINGS



#Add switchip files:

../../pi-kitchen/001-direct-network/direct/cmdline.txt /network/direct

../../pi-kitchen/001-direct-network/normal/cmdline.txt /network/normal

../../pi-kitchen/_SETTINGS/001-direct-network/internet/cmdline.txt /network/internet



#Recipe: 001-direct-network

#Add switchip files:

#- should be set as executable

../../pi-kitchen/001-direct-network/ /home/pi/bin +x

Enjoy baking your Raspberry Pi SD-Card fresh from the Pi-Kitchen.

  1. Bifff says:

    Where do I find internet/cmdline.txt?

    • Unfortunately on NOOBS based installs, the boot partition isn’t viewable directly from windows, you’ll have to use a linux computer/liveCD to access these files.
      You can still use the older method of installing using img files, which makes the boot partition available from windows.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.