Question: how to connect two laptops using wifi in ubuntu?
Answer: Choose Edit Connections... ... 
Then select Wi-Fi as the connection type, then press the button Create....
Then in the opened window, set the details as you wish, only thing you have to modify is the SSID, it is the name of the wireless network.