Blog Home Dudermang

How to set a static ip address in a linux environment.

by Corey Faulkerson

Posted on 2016-10-21 01:32:07



I assume you are already logged in to your device either ssh, RDP, or physically plugged into it and have a terminal opened up.

1) ifconfig will show you your current ip address,
2) sudo su
3) enter password
4) nano /etec/network/interfaces
you should see something like this,
         auto eth0
iface eth0 inet static
address 10.2.50.250
netmask 255.255.255.0
gateway 10.2.50.1
5) change the ip address and press Ctrl+x,
6) type y and press enter
7) reboot
Back

Keywords

linux, ip, address, static, set, command