Question:
Hi everyone!
I am very new to linux so sorry for a very basic question. I would like to find out what is the IP address of my computer using the linux operating system. Can someone help?
Answer:
The easiest way to find your IP address on Linux is with ifconfig
or ip
command or follow this link to check your Local and Public IP address directly using your web browser. The manual process of finding your internal IP address would be as follows. Start by opening your terminal and type:
# /sbin/ifconfig
On systemd systems you can try as root:
# ip addr show
Your output will be different. In case you know the name of your network interface you can also use it as an argument with ifconfig
command such as:
$ /sbin/ifconfig eth0
to get IP of that particular network interface only. If you are using wireless network interface your network interface name could be wlan0:
$ /sbin/ifconfig wlan0 wlan0 Link encap:Ethernet HWaddr 8c:70:5a:92:f6:e0 inet addr:10.1.1.78 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::8e70:5aff:fe92:f6e0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:24557 errors:0 dropped:0 overruns:0 frame:0 TX packets:18095 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:17493073 (17.4 MB) TX bytes:3226275 (3.2 MB)