You are here: Home Desktop Linux How to assign IP address on the linux computer?

How to assign IP address on the linux computer?

If you want to configure the Ip address on your linux computer there are some simple steps that you should follow. Use the following command

First backup all the network settings /etc/network/interfaces file by typing the code in the console ‘cp/etc/network/interfaces/etc/network/interfaces.backup’

Now type

Ifconfig eth1 10. 255. 0. 1 broadcast 10.255.0.255 netmask 255.255.255.0

if you want to make the setting permanent then you can edit the file or create the file.

/etc/sysconfig/network-scripts/ifcfg-eth1 and edit the file and give the desired ip address numbers.
Device = eth1
Ip address = 10.255.0.1
Broadcast = 10.255.0.255
Netmask = 255.255.255.0
On boot = yes