You can change the DNS IP address in Red Hat Enterprise Linux by editing the network configuration file. Here’s how:
- Open the network configuration file:
sudo nano /etc/sysconfig/network-scripts/ifcfg-<interface>
where<interface>
is the name of your network interface (e.g.eth0
). - Modify the
DNS
line to the desired IP address, e.g.:DNS1=8.8.8.8
- Save the file and exit the editor.
- Restart the network service to apply the changes:
sudo systemctl restart network
- Verify the changes by checking the DNS resolution:
nslookup google.com
Note: The exact file path and instructions may vary depending on the version of Red Hat Enterprise Linux you are using.