how to assign ip address using ifconfig in Linux / Unix

To assign an IP address to an interface you would use:
ifconfig eth mask
Where eth is the interface name. An example of this would be:
ifconfig eth0:1 192.168.0.1 mask 255.255.255.0

or  Simply

 

ifconfig eth0:1 192.168.0.1/24

 

 

It's only fair to share...Tweet about this on TwitterShare on Google+Share on FacebookShare on LinkedInEmail this to someone
Twitter Auto Publish Powered By : XYZScripts.com