LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is the Linux terminal command to enable wireless? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-linux-terminal-command-to-enable-wireless-947562/)

omega341991 05-30-2012 06:43 AM

what is the Linux terminal command to enable wireless?
 
There is an option in the taskbar in Ubuntu named "Enable Wireless"
How can i enable and disable this option from the terminal ?

I have already tried the commands

ifconfig interface_name up
ifconfig interface_name down

These have no effect whatsoever.

please reply

r00t 05-30-2012 08:41 AM

You need to use iwconfig instead of ifconfig for wireless.

whysoserious 05-30-2012 09:18 AM

iwconfig then the interface name should do it. Are you using DHCP assignment or static?

elliott678 05-30-2012 01:03 PM

When you use the "Enable/Disable" wireless does it actually turn your card off or does it just disconnect from the router? If you want to turn off the card rfkill is what you want. I believe "rfkill block wifi" to disable and "rfkill unblock wifi" to enable should work.

omega341991 05-31-2012 11:01 PM

When i use iwconfig , this is the error that i get


root@ubn1# iwconfig wlan0 down
iwconfig: unknown command "down"

If i dont give "down" ,it just lists the wireless devices


What should i do?

whysoserious 06-01-2012 05:16 AM

What is the output of the ifconfig command and the iwlist command

hidoussi 06-01-2012 01:00 PM

Quote:

Originally Posted by omega341991 (Post 4691100)
There is an option in the taskbar in Ubuntu named "Enable Wireless"
How can i enable and disable this option from the terminal ?

I have already tried the commands

ifconfig interface_name up
ifconfig interface_name down

These have no effect whatsoever.

please reply

try with this commande

for me i have debian and it's work

the command is: ifdown wlan0

elliott678 06-01-2012 03:59 PM

Those commands just disconnect the wireless, do you want to disconnect or actually turn the card off?

omega341991 06-03-2012 11:46 PM

It's workung now. Used a combination of rfkills and ifconfig
Rfkill refreshes the network and ifconfig down temporarily downs the network

Problem solved

Thanks for your help :)


All times are GMT -5. The time now is 07:48 PM.