흔자
반응형

hostname

 

hostname은 시스템의 호스트 이름을 표시하거나 설정할 때 사용한다.

-I( --all-ip-addresses ) 옵션을 추가하면 나의 ip 주소를 확인할 수 있다.

/etc/hostname 파일에 hostname 또한 확인가능하다.

hostname -I
172.30.1.xx

 

 

ifconfig

ifconfig 명령어는 네트워크 인터페이스 구성에 대해 확인할 수 있다.

해당 명령어 입력 시에 2번째 줄 inet 뒤에 있는 ip주소를 확인할 수 있다.

ifconfig
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.30.1.xx  netmask 255.255.255.0  broadcast 172.30.1.255
        inet6 fe80::1e1b:dff:fe4c:74ca  prefixlen 64  scopeid 0x20<link>
        ether 1c:1b:0d:4c:74:ca  txqueuelen 1000  (Ethernet)
        RX packets 163871  bytes 164231677 (164.2 MB)
        RX errors 0  dropped 50414  overruns 0  frame 0
        TX packets 44170  bytes 3550798 (3.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 186  bytes 16466 (16.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 186  bytes 16466 (16.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
반응형
profile

흔자

@heun_n

즐겁게 개발하고 싶은 사람입니다.