Also, ifconfig has nothing to do with wireless, so it was a red herring
from the start.
Your issue is you don't have a wlan0 on
your particular system so you got an error.
The OP indicated they do have a wlan0, so
lets see what they find without speculating.