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