Use the following command with the option hw ether to modify an eth0 network interfaces MAC (Media Access Control) address. Ifconfig In Linux Don't forget to switch back to the regular (non-root) user account when you're done. The installation method of ifconfig is the same in all distributions, only the difference is in the usage of the package manager. How to Assign an IP Address on a Linux Computer In order to use IPv4 on your computer, you must first set up your IP address. As discussed earlier, the ifconfig command is quite a useful utility for Linux administrators and has multiple usages. Participate in the 10th Annual Open Source Jobs Report and Tell Us What Matters Most. The Useful ifconfig Commands and their real-world applications are covered in this article. Jack Lloyd is a Technology Writer and Editor for wikiHow. The following commands will get you the private IP address of your interfaces:ifconfig -a.ip addr (ip a)hostname -I | awk 'print $1'ip route get 1.2. (Fedora) Wifi-Settings click the setting icon next to the Wifi name that you are connected to Ipv4 and Ipv6 both can be seen.nmcli -p device show. Open that file and set: NETWORKING=yes HOSTNAME=node01.tecmint.com GATEWAY=192.168.0.1 NETWORKING_IPV6=no IPV6INIT=no. We also have to provide the CIDR notation for the subnet mask. Let us now configure a static IP address to this NIC. Use this command with root permissions. The syntax for this command is ifconfig [interface] [IP address]. To do this, simply type ifconfig eth0 into the terminal and press Enter. #ip addr add [IP ADDRESS/Subnet Mask] dev [interface] The following command adds the IP We can do it simply by giving colon (:) and alias number. How to change IP address on RHEL 8 / CentOS 8 LinuxSoftware Requirements and Conventions Used. RedHat Enterprise Linux 8.0 Privileged access to your Linux system as root or via the sudo command.The GUI way. The easiest way to change your IP address in RHEL 8 / CentOS 8 is to use GNOME s Settings window. The CLI way. Conclusion. Update: The networking command ifconfig is deprecated and replaced by the ip command (Learn 10 Examples of IP Command) in most Linux distributions. For example, ifconfig eth0 172.16.25.125 will set the IP address to interface eth0. For example, ifconfig eth0 netmask 255.255.255.224 will set the network mask to a given interface eth0. ifconfig commands accepts following options and arguments: 1. ifconfig command without any argument displays the details of all the active interfaces. Youll find the IP address you need by searching for UP, BROADCAST, RUNNING, and MULTICAST on the list. In this mode the interface card will capture all the packets being broadcast. Use the following command to add the alias network interface for eth0. Use the following command to add the alias network interface for eth0. Click the text box at the top or bottom of the screen if possible. Simply enter your IP address in this form, without disclosing any additional information. By clicking on your Start Menu and typing cmd, you can get to the search box. How to Install and Use FFmpeg on Ubuntu 20.04, Python Split String Into List of Characters. The mtu argument sets the maximum transmission unit to an interface. Click on the settings icon to start configuration. Example 3: Assign an IP Address. Todays network tools use the promiscuous mode to capture and analyze the packets that flow through the network interface. Click th Open Terminal. Required fields are marked *. Without any parameters, the ifconfig program will list all the details of the current interfaces. How to Run Linux Commands in the Background? IPv4 addresses and IPv6 addresses can be found in this section. 4. ifconfig command along with down option can be used to deactivate a network interface. How to configure To display the configuration details of the specific network interface, run the command with its name. To add a virtual IP address, add :n where n is a number after the name of the network interface.For example, ifconfig eth0:0 10.0.0.10 adds the address 10.0.0.10 as a virtual IP address to eth0. Next, verify the newly created alias network interface address, by using the ifconfig eth0:0 command. This is generally used by network sniffer programs like Wireshark to analyze broadcast packets. IP Address Your email address will not be published. For example, see below. Linux | ifconfig Command Examples Its Linux FOSS {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/e\/e1\/Assign-an-IP-Address-on-a-Linux-Computer-Step-1-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-1-Version-2.jpg","bigUrl":"\/images\/thumb\/e\/e1\/Assign-an-IP-Address-on-a-Linux-Computer-Step-1-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-1-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/6\/61\/Assign-an-IP-Address-on-a-Linux-Computer-Step-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-2.jpg","bigUrl":"\/images\/thumb\/6\/61\/Assign-an-IP-Address-on-a-Linux-Computer-Step-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/b\/b3\/Assign-an-IP-Address-on-a-Linux-Computer-Step-3-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-3-Version-2.jpg","bigUrl":"\/images\/thumb\/b\/b3\/Assign-an-IP-Address-on-a-Linux-Computer-Step-3-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-3-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/3\/3c\/Assign-an-IP-Address-on-a-Linux-Computer-Step-4-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-4-Version-2.jpg","bigUrl":"\/images\/thumb\/3\/3c\/Assign-an-IP-Address-on-a-Linux-Computer-Step-4-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-4-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/7\/78\/Assign-an-IP-Address-on-a-Linux-Computer-Step-5-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-5-Version-2.jpg","bigUrl":"\/images\/thumb\/7\/78\/Assign-an-IP-Address-on-a-Linux-Computer-Step-5-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-5-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/0\/08\/Assign-an-IP-Address-on-a-Linux-Computer-Step-6-Version-3.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-6-Version-3.jpg","bigUrl":"\/images\/thumb\/0\/08\/Assign-an-IP-Address-on-a-Linux-Computer-Step-6-Version-3.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-6-Version-3.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/2\/24\/Assign-an-IP-Address-on-a-Linux-Computer-Step-7-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-7-Version-2.jpg","bigUrl":"\/images\/thumb\/2\/24\/Assign-an-IP-Address-on-a-Linux-Computer-Step-7-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-7-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/0\/04\/Assign-an-IP-Address-on-a-Linux-Computer-Step-8-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-8-Version-2.jpg","bigUrl":"\/images\/thumb\/0\/04\/Assign-an-IP-Address-on-a-Linux-Computer-Step-8-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-8-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/a\/a9\/Assign-an-IP-Address-on-a-Linux-Computer-Step-9-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-9-Version-2.jpg","bigUrl":"\/images\/thumb\/a\/a9\/Assign-an-IP-Address-on-a-Linux-Computer-Step-9-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-9-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/8\/8a\/Assign-an-IP-Address-on-a-Linux-Computer-Step-10-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-10-Version-2.jpg","bigUrl":"\/images\/thumb\/8\/8a\/Assign-an-IP-Address-on-a-Linux-Computer-Step-10-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-10-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/8\/8c\/Assign-an-IP-Address-on-a-Linux-Computer-Step-11-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-11-Version-2.jpg","bigUrl":"\/images\/thumb\/8\/8c\/Assign-an-IP-Address-on-a-Linux-Computer-Step-11-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-11-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/e\/e1\/Assign-an-IP-Address-on-a-Linux-Computer-Step-12-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-12-Version-2.jpg","bigUrl":"\/images\/thumb\/e\/e1\/Assign-an-IP-Address-on-a-Linux-Computer-Step-12-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-12-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/6\/67\/Assign-an-IP-Address-on-a-Linux-Computer-Step-13-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-13-Version-2.jpg","bigUrl":"\/images\/thumb\/6\/67\/Assign-an-IP-Address-on-a-Linux-Computer-Step-13-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-13-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/9\/9d\/Assign-an-IP-Address-on-a-Linux-Computer-Step-15-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-15-Version-2.jpg","bigUrl":"\/images\/thumb\/9\/9d\/Assign-an-IP-Address-on-a-Linux-Computer-Step-15-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-15-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/9\/9f\/Assign-an-IP-Address-on-a-Linux-Computer-Step-16-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-16-Version-2.jpg","bigUrl":"\/images\/thumb\/9\/9f\/Assign-an-IP-Address-on-a-Linux-Computer-Step-16-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-16-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/a\/aa\/Assign-an-IP-Address-on-a-Linux-Computer-Step-17-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-17-Version-2.jpg","bigUrl":"\/images\/thumb\/a\/aa\/Assign-an-IP-Address-on-a-Linux-Computer-Step-17-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-17-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/3\/39\/Assign-an-IP-Address-on-a-Linux-Computer-Step-18-Version-3.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-18-Version-3.jpg","bigUrl":"\/images\/thumb\/3\/39\/Assign-an-IP-Address-on-a-Linux-Computer-Step-18-Version-3.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-18-Version-3.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"

License: Fair Use<\/a> (screenshot)
\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/1\/18\/Assign-an-IP-Address-on-a-Linux-Computer-Step-19-Version-2.jpg\/v4-460px-Assign-an-IP-Address-on-a-Linux-Computer-Step-19-Version-2.jpg","bigUrl":"\/images\/thumb\/1\/18\/Assign-an-IP-Address-on-a-Linux-Computer-Step-19-Version-2.jpg\/aid7961-v4-728px-Assign-an-IP-Address-on-a-Linux-Computer-Step-19-Version-2.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"