Since we used ’sudo’ you need to enter your Mac’s password then hit enter.
sudo networksetup -setmanual AdHoc 192.168.1.88 255.255.255.255
- sudo again
- 'networksetup -setmanual AdHoc’ says “ok, that service we just created, AdHoc? We’re going to set a manual IP address for it.
- 192.168.1.88 is the address to set
- 255.255.255.255 is the subnet mask which is complex to explain, but in this case it means “this network is a point to point link only, and not going to be used for anything other than direct communication with one thing on the other side.”
Now close Terminal and open System Settings > General > Sharing.
Click the (i) button next to Internet Sharing.
Next to “Share your connection from” choose “AdHoc”
Below that, under “To devices using”, switch on Wi-Fi.
At the top, switch on Internet Sharing.
Voila.
When you want your Mac to use Wi-Fi the normal way, just switch off Internet Sharing.
But, once again, I really encourage you to buy even a cheap Wi-Fi router instead of doing this!
Best
Sam