Automatically disable wireless networks when Ubuntu is started

Source: Internet
Author: User
There is almost no wireless network to access the Internet at home, so you have always chosen to disable wireless network cards in Windows. You can enable the wireless network cards whenever needed. However, NetworkManager in Ubuntu does not provide this option, the check box before "enable wireless" can only be temporarily disabled. After the restart, Wifi will still be automatically enabled, which will not bother. There are roughly two simple methods for disabling wireless networks automatically when Ubuntu is started. The auto-start script adds the following command to "start the application" to disable the wireless network.

There is almost no wireless network to access the Internet at home, so you have always chosen to disable wireless network cards in Windows. You can enable the wireless network cards whenever needed. However, NetworkManager in Ubuntu does not provide this option, the check box before "enable wireless" can only be temporarily disabled. After the restart, Wifi will still be automatically enabled, which will not bother. There are roughly two simple methods for disabling wireless networks automatically when Ubuntu is started.

Self-starting script
Add the following command to "start the application" to disable the wireless network.

View the source code print help 1 release-send -- system -- type = method_call -- dest = org. freedesktop. networkManager/org/freedesktop/NetworkManager org. freedesktop. invalid. properties. set string: org. freedesktop. networkManager string: WirelessEnabled variant: boolean: false

This is the most flexible and most effective method. The only drawback is that the wireless network will be re-enabled when the computer wakes up from the STANDBY state.

Driver blacklist
Add the wireless NIC driver to the blacklist to completely disable the wireless network.

To disable the driver, you must first know the driver name of the wireless network card. Enter the lshw command in the terminal to list the detailed information of the computer hardware, from www.linuxidc.com, we can obtain the driver name of the wireless network card. The following is an information segment:

01 *-network

02 description: Wireless interface

03 product: PRO/Wireless 3945ABG [Golan] Network Connection

04 vendor: Intel Corporation

05 physical id: 0

06 bus info: pci @ 3::0:00. 0

07 logical name: wlan0

08 version: 02

09 serial:

10 width: 32 bits

11 clock: 33 MHz

12 capabilities: bus_master cap_list ethernet physical wireless

13 configuration: broadcast = yes driver = iwl3945 latency = 0 multicast =

The last line shows that the driver name of my wireless network card is iwl3945 (intel 3945abg wireless network card). You can add it to the blacklist as follows:

Sudo gedit/etc/modprobe. d/blacklist. conf
Add blacklist iwl3945 to the end of the text
Restart
If you do not need Wireless Networks for a long time, this method is clean and thorough.

If you have learned how to configure the interfaces file, you can leave NetworkManager alone to control network settings more flexibly. Now we can gradually understand the advantages of writing all configuration files into text documents in Linux.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.