Refer to How to setup wifi connection command line utility, for examples of "how to setup wifi connection".