This answer is still valid, but is not best practice in Stretch. See How to set up networking/WiFi You can use
dhcpcd but prevent dhcpcd from configuring the
I have setup Ad-Hoc mode on my Pi3.
This involves modification to network configuration file
/etc/network/interfaces so you should first make a backup e.g.
sudo cp /etc/network/interfaces /etc/network/interfaces.orig.
interfaces file with the following:-
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet static
You can choose your own address, SSID and wireless-channel, but all machines should have the same settings.
Strictly you should should disable
dhcpcd as this will try to automatically configure networks.
sudo systemctl stop dhcpcd.service will stop (deactivate) dhcpcd.
dhcp it will automatically be disabled.