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 Twitter
Twitter
Share on Google+
Google+
Share on Facebook
Facebook
Share on LinkedIn
Linkedin
Email this to someone
email
WP Twitter Auto Publish Powered By : XYZScripts.com