Contents
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.
How can you configure network settings in Linux?
This is a three step process:
- Issue the command: hostname new-host-name.
- Change network configuration file: /etc/sysconfig/network. Edit entry: HOSTNAME=new-host-name.
- Restart systems which relied on the hostname (or reboot): Restart network services: service network restart. (or: /etc/init.d/network restart)
How do I reset network settings in Linux?
Ubuntu / Debian
- 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.
- Once this done, use the following command to check the server network status.