우분투에서 정적 IP를 설정하는 방법이다.
1. 설정 파일을 연다.
sudo vim /etc/network/interfaces
2. 설정 파일을 아래와 같이 수정한다.
# The primary network interface auto eth0 iface eth0 inet static <-- dhcp를 static으로 수정, 아래는 ifconfig해서 보이는 정보 입력.. address 192.168.0.100 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.1
3. 네트웍을 다시 시작한다.
sudo /etc/init.d/networking restart