I am a newbie to ubuntu 12.04.pls tell me how to connect to wireless network via terminal.I use a tata photon plus usb model.

How do i know that my internet is connected?(from terminal)
I need to install,and update some packages.Somehow I couldn't do them through browser, because my system is running in low graphics.I need to fix a lot,for which i need to connect to internet.

your answers helps -already- half the way. I think it would be great and maybe help further if you added some insights to use iwconfigìwlist and wpa_supplicant, which are usedful/necessary. Especially when wanting to connect to a wireless router that uses some encryption. I assume the question asker would need more than just enabling the device at least the user wrote "connect wireless" in the question
–
humanityANDpeaceJan 8 '13 at 12:25