- Forums
- Networking
- Command to Change IP Address in Linux
if you have a webune linux dedicated server, this command is useful if you ever need to change your servers ip address with just one command from the terminal shell. [3496], Last Updated: Mon Jun 24, 2024
Webune Support
Sun Feb 28, 2010
0 Comments
355 Visits
if you have a Webune Linux Dedicated server, this command is useful if you ever need to change your servers ip address with just one command from the terminal shell.
lets say for example, i want to set the ip address of my ETH0 to 192.168.0.101 and a netmask of 255.255.255.0 i can use this command:
SHELL COMMAND:
ifconfig eth0 up 192.168.0.101 netmask 255.255.255.0 i
after you have set your configuration, you can restart your network:
SHELL COMMAND:
/etc/init.d/network restart
another way is to send this command if you have a RedHat, Fedora or CentOS server:
SHELL COMMAND:
setup