
- #Useful command prompt commands for networking how to
- #Useful command prompt commands for networking update
# ip link set eth1 up $ sudo ip link set eth1 up 5. For example, the following command will activate the eth1 network interface. The “ up” flag with interface name ( eth1) enables a network interface. The following command will remove an assigned IP address from the given interface ( eth1). Valid_lft forever preferred_lft forever 3. Inet6 fe80::20c:29ff:fe28:fd4c/64 scope linkģ: eth1: mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000 # ip addr show $ sudo ip addr show Sample Output 1: lo: mtu 16436 qdisc noqueue state UNKNOWN To get the depth information of your network interfaces like IP Address, MAC Address information, use the following command as shown below. Note: Unfortunately all these settings will be lost after a system restart.
:max_bytes(150000):strip_icc()/command-prompt-drag-and-drop-581132655f9b58564ca953c2.png)
The following command is used to assign an IP Addresses to a specific interface ( eth1) on the fly.
#Useful command prompt commands for networking how to
How to Assign an IP Address to a Specific Interface

Next, restart network services after entering all the details using the following command. GATEWAY=192.168.50.1 For Ubuntu/Debian/Linux MintĪssign Static IP Address to eth0 interface editing configuration file /etc/network/interfaces to make permanent changes as shown below. ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 Simple output: DEVICE="eth0" For example, assigning IP Address to eth0 interface as follows. Open and edit the network configuration files for ( eth0 or eth1) using your favorite text editor. For RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux You must be a superuser with a su (switch user) command from the terminal or command prompt.
#Useful command prompt commands for networking update
To configure static IP Addresses in Linux, you need to update or edit the network configuration file to assign a Static IP Address to a system. How Do I Configure Static IP Address Internet Protocol (IPv4)

Note: Please take configuration file backup before doing any changes.
