1. ip
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | $ ifconfig ens160 Link encap:Ethernet HWaddr 12:0c:29:3a:id:ab inet addr:192.168.10.30 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:593671 errors:0 dropped:0 overruns:0 frame:0 TX packets:297404 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:460588158 (460.5 MB) TX bytes:112335278 (112.3 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:91186 errors:0 dropped:0 overruns:0 frame:0 TX packets:91186 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:12822719 (12.8 MB) TX bytes:12822719 (12.8 MB) | cs |
* 위에 표기된 내용은 임의의 값입니다.
2. interfaces 파일 편집
1 2 | $ sudo vi /etc/network/interfaces | cs |
2-1. interfaces 수정 전
1 2 3 4 5 6 7 8 9 10 11 12 13 | # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto ens160 iface ens160 inet dhcp | cs |
2-2 interfaces 수정 후
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto ens160 iface ens160 inet static address 192.168.10.30 netmask 255.255.255.0 broadcast 192.168.10.255 gateway 192.168.10.1 network 192.168.10.0 dns-nameservers 8.8.8.8 | cs |
* 위와 같이 수정 후 저장합니다.
3. networking.service 재시작
1 2 | $ sudo systemctl restart networking.service | cs |
4. 시스템 재부팅
1 2 | $ sudo reboot now | cs |
'Operating System > Linux' 카테고리의 다른 글
Ubuntu ssh server 설치 (0) | 2017.10.18 |
---|---|
head 명령어 (0) | 2017.10.16 |
FTP 설치 및 접속 (0) | 2017.10.12 |
root 비밀번호 설정 (0) | 2017.10.12 |
Ubuntu Server 설치 (0) | 2017.10.12 |