There are many useful commands. First is lsusb, which lists all connected usb devices. You should see there your usb adapter.
Second is lspci, showing all devices connected to the PCI bus. In my case, for instance, I obtain (restricting the output to network devices only):
$ lspci -vnn | grep -i net 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04) 04:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6235 [8086:088e] (rev 24)
This shows the all-important code of your wifi card, [8086:088e] in my case.
Then you search for this code in Wikidevi: the page it finds says that the driver for my wireless card is iwlwifi in my case. It is important you use the code in square parentheses above, because producers often have several versions of a wifi adapter with different chips, sometimes even from different manufacturers (!!!) requiring different drivers. Thus the only certain way to identify your driver does not involve the adapter's name, but its code.
Now that we know the driver's name we first check whether we have it,
modinfo iwlwifi
If there is some output, we have it. Then we check that it really is suited to my card, as follows:
$ modinfo iwlwifi | grep 8086 | grep 088E alias: pci:v00008086d0000088Esv*sd00004860bc*sc*i* alias: pci:v00008086d0000088Esv*sd0000446Abc*sc*i* alias: pci:v00008086d0000088Esv*sd00004460bc*sc*i* alias: pci:v00008086d0000088Esv*sd0000406Abc*sc*i* alias: pci:v00008086d0000088Esv*sd00004060bc*sc*i*
This shows that my driver has several lines (corresponding to several different versions of my wifi adapter) for my card's Vendor code V8086 and Device code d088E. Notice that in this case you must use capital letters, E in my case. So this driver is indeed suited to my adapter.
Then, we check whether it is correctly mounted:
sudo lshw -C network
The output is longish (it involves ethernet card, 3G card, ...) but the relevant part is:
*-network description: Wireless interface product: Centrino Advanced-N 6235 vendor: Intel Corporation physical id: 0 bus info: pci@0000:04:00.0 logical name: wlan0 version: 24 serial: c8:f7:33:4c:cc:e1 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-27-generic firmware=18.168.6.1 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn resources: irq:47 memory:e2500000-e2501fff
Here you see that it says driver=iwlwifi and firmware=.... Thus the correct driver and firmware have been loaded into the kernel. Everything works fine, in my case.
Lastly, we may check whether the adapter is up or down: from the previous output you see that my wifi card is given physical name 0 (corresponding to phy0) and logical name wlan0. I can search for its current status by means of
$ ip link list dev wlan0 3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000 link/ether c8:f7:33:4c:cc:e1 brd ff:ff:ff:ff:ff:ff
which clearly states it is UP. If it didn't, this command
sudo ip link set dev wlan0 up
would bring it up.
If all of this has been checked and is ok but your wifi still does not work, you can get useful info from the command:
dmesg | grep wlan0
or wlan1 or whatever your wifi card is called.
You can go through the same steps, and see what is missing in your case.