N
Common Ground News

How do I change the network interface in Linux?

Author

Penelope Carter

Updated on February 19, 2026

How do I change the network interface in Linux?

Open your /etc/network/interfaces file, locate the:
  1. "iface eth0" line and change dynamic to static.
  2. address line and change the address to the static IP address.
  3. netmask line and change the address to the correct subnet mask.
  4. gateway line and change the address to the correct gateway address.

Simply so, how do you rename a network interface in Linux?

Configuration

  1. Find the MAC address of the ports you wish to change their names (e.g., enp2s0f0 and enp2s0f1): # ifconfig.
  2. Create the configuration file (70-persistent-net.rules)
  3. Create/edit the ifcfg file for the port configuration:
  4. Reboot the server and then verify the name changes by running ifconfig.

Additionally, how do I change network settings in Linux? To change your IP address on Linux, use the “ifconfig” command followed by the name of your network interface and the new IP address to be changed on your computer. To assign the subnet mask, you can either add a “netmask” clause followed by the subnet mask or use the CIDR notation directly.

Also, how do I bring up the network interface in Linux?

How to Enable (UP)/Disable (DOWN) a Network Interface Port (NIC) in Linux

  1. ifconfig Command: The ifconfig command is used configure a network interface.
  2. ifdown/ifup Command: The ifdown command take a network interface down and the ifup command bring a network interface up.
  3. ip Command: ip command is used to manage NIC.

How do I change my network interface?

How to change network adapter priorities using Control Panel

  1. Open Settings.
  2. Click on Network & Internet.
  3. Click on Status.
  4. Click the Change Adapter options item.
  5. Right-click the network adapter you want to prioritize, and select Properties.
  6. Select the Internet Protocol Version 4 (TCP/IPv4) item.

How do I find my network interface name in Linux?

Identify Network Interfaces on Linux
  1. IPv4. You can get a list of the network interfaces and IPv4 addresses on your server by running the following command: /sbin/ip -4 -o a | cut -d ' ' -f 2,7 | cut -d '/' -f 1.
  2. IPv6. For IPv6, you can run a similar command but use “-6” in place of “-4”: /sbin/ip -6 -o a | cut -d ' ' -f 2,7 | cut -d '/' -f 1.
  3. Full output.

How do I find my network interface name?

1. Log in to the system as root and run ifconfig -a plumb in a command shell. The command discovers all installed network interfaces. The shell prompt (#) appears when the discovery completes.

What is a network interface name?

Network interface names are based on whether the interface is a physical or virtual network interface. Because physical interfaces are Ethernet interfaces, they are identified by a name consisting of "e," the slot number of the adapter, and the port on the adapter (if multi-port adapter).

What is ens33 interface?

The ens33 network interface has the IPv4 address 192.168. 21.131 and the ens37 network interface has the IPv4 address 192.168. 50.1. The ip command also prints the IPv6 address attached to the network interfaces of your Linux server or workstation.

How do I change my WiFi interface name?

To change the name of your WiFi network (also known as SSID, or Service Set Identifier), you need to enter your router's admin page.
  1. Enter your router's IP address into your favorite web browser.
  2. Log in as the administrator.
  3. Go to settings and look for an option titled “WiFi name” or “SSID”.
  4. Enter your new WiFi name.

How do I change my network interface name Ubuntu?

Look for “GRUB_CMDLINE_LINUX” and add the following”net. ifnames=0 biosdevname=0“. Generate a new grub file using the following command. Edit the interface file and change the network device name so that you will have a DHCP or static IP address for ethX.

What is eth0 eth1 eth2 Linux?

eth0 is the first Ethernet interface. (Additional Ethernet interfaces would be named eth1, eth2, etc.) This is a special network interface that the system uses to communicate with itself. wlan0 is the name of the first wireless network interface on the system.

How do I rename my NIC?

Rename a Network Adapter in Settings or Control Panel

Windows 7 and 8: Click Start > Control Panel > Network and Sharing Center. Click on Change adapter settings. Click on the Network connection you want to rename. Click on Rename this connection above.

How do I manually assign an IP address in Linux?

How to Manually Set Your IP in Linux (including ip/netplan)
  1. Set Your IP Address. ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up.
  2. Set Your Default Gateway. route add default gw 192.168.1.1.
  3. Set Your DNS Server. Yes, 1.1. 1.1 is a real DNS resolver by CloudFlare. echo "nameserver 1.1.1.1" > /etc/resolv.conf.

How do I bring up bond0 in Linux?

What is Bonding & How to Configure Bonding in Linux
  1. Step 1: Create a Bonding Channel Configuration File. Linux and other platforms stores network configuration by default in /etc/sysconfig/network-scripts/ directory.
  2. Step 3: Load bond driver/module. Make sure bonding module is loaded when the channel-bonding interface (bond0) is brought up.
  3. Step 4: Test configuration.

How do you increase wlan0?

1 Answer
  1. Run sudo ifdown wlan0 and sudo ifconfig wlan0 down (these will probably output errors, just continue).
  2. Then check the output of ip route for any routes related to wlan0. If there are any use sudo ip route del to remove them (for example, sudo ip route del 192.168. 1.0/24 dev wlan0 ).
  3. Try sudo ifup wlan0 again.

How do you add an IP address to a routing table in Linux?

2.Adding a Default Gateway
  1. First it will query the DNS server to obtain the ip-address of google.com ( for example: 74.125.236.34 )
  2. The destination address ( 74.125.
  3. So, in Layer-3 (IP header) the DESTINATION IP will be set as “74.125.

What is Network in Linux?

Computers are connected in a network to exchange information or resources each other. Two or more computer connected through network media called computer network. Computer loaded with Linux Operating System can also be a part of network whether it is small or large network by its multitasking and multiuser natures.

How use IFUP command in Linux?

Technically ifup command is used to configure network interfaces based on interface definitions in the file /etc/network/interfaces. Syntax: ifup [-nv] [--no-act] [--verbose] [-i FILE|--interfaces=FILE] [--allow CLASS] -a|IFACE

How do I restart ifconfig in Linux?

To restart a network interface in Linux, you can use the ifdown to turn off the given network interface, then using the ifup command to turn on again so that to restart that network interface. After restarting the network interface, you can use ip or ifconfig command to get the ip address information.

Where is network config file in Linux?

To store IP addresses and other related settings, Linux uses a separate configuration file for each network interface. All these Configuration files are stored in the /etc/sysconfig/network-scripts directory.

How do you set a default route in Linux?

sudo route add default gw IP Address Adapter .

For example, to change the default gateway of the eth0 adapter to 192.168. 1.254, you would type sudo route add default gw 192.168. 1.254 eth0 . You'll be prompted for your user password in order to complete the command.

How do you configure a network?

All you have to do is follow these five steps.
  1. Connect your router. The router is the gateway between the Internet and your home network.
  2. Access the router's interface and lock it down.
  3. Configure security and IP addressing.
  4. Set up sharing and control.
  5. Set up user accounts.

How do I restart a Linux network?

Ubuntu / Debian
  1. Use the following command to restart the server networking service. # sudo /etc/init.d/networking restart or # sudo /etc/init.d/networking stop # sudo /etc/init.d/networking start else # sudo systemctl restart networking.
  2. Once this done, use the following command to check the server network status.

What is Ethernet configuration?

As described in the Network Configuration section, Ethernet interfaces have two configuration tabs: TCP/IP and DHCP & NAT. Each Ethernet interface may be configured either as LAN or WAN; it may also be disabled.

Where is eth0 file in Linux?

Each Linux network interface has an ifcfg configuration file located in /etc/sysconfig/network-scripts. The device name is added to the end of the filename. So, for example, the configuration file for the first Ethernet interface is called ifcfg-eth0.

How do I change network adapter settings?

Configure the Network Adapter Settings for Optimal Performance
  1. Press and hold the Windows (
  2. In the Search box, type change ethernet settings.
  3. Touch or click Change Ethernet settings (System settings).
  4. Touch or click Change adapter options.
  5. Hover your cursor over the Ethernet listing making note of the network adapter manufacturer and model number.
  6. Press and hold the Windows (

What is the automatic metric setting?

Automatic Metric is a new feature in Windows that automatically configures the metric for the local routes that are based on link speed. The Automatic Metric feature is enabled by default, and it can also be manually configured to assign a specific metric.

How do I change my WIFI priority?

To set the Wi-Fi signal priority, select the overflow menu, then Arrange Network Priority. From here, you can drag and drop your saved Wi-Fi networks into the order of your preference. You can also create a "top tier" of Wi-Fi networks at the very top of the list.