How to Disable Network Card in Ubuntu

To disable a network card in Ubuntu system, you can use either the ifconfig command or NetworkManager.

Option 1: Utilizing the ifconfig command.

  1. Open the terminal (Ctrl+Alt+T).
  2. Enter the following command to check the current status of the network interface:
ifconfig
  1. Identify the network interface that needs to be disabled, such as eth0 or wlan0.
  2. Please disable this network interface with the following command:
sudo ifconfig <interface_name> down

For example, to disable the eth0 interface, you can type:

sudo ifconfig eth0 down

Option 2: Utilize NetworkManager.

  1. Click on the network icon in the top right corner of the system and select “Edit Connections”.
  2. In the pop-up window, select the network connection you want to disable and click on “Edit”.
  3. Uncheck the option “Automatically connect to this network when it is available” in the “General” tab.
  4. Click “Save” to save the changes.

You can disable network interfaces in the Ubuntu system using either of the two methods mentioned above.

bannerAds