Change Netmask – How To Change Netmask From The Command Prompt

Here are some simple steps to change Netmask for an IP in Linux from command prompt.

Login into your Linux box

From command prompt open the /etc/ips file which contains the IP configuration and netmask.

vi /etc/ips

If you have many IP addresses then search for the IP address for which you wish to change the netmask.

Change the netmask, save the file and exit.

Now you want to restart the IP aliases as well, which you can do from following commands.

service ipaliases restart

Once done you can verify the change from following command

cat /etc/ips | grep

replace with your IP Address for which you have changed the netmask.


Leave a Reply

Your email address will not be published. Required fields are marked *