How can I find the IP of my Ubuntu System in local network?
4 Answers
ifconfig is and old command, that is still widely used, but if you are starting with network-related commands, you should use ip tool.
ip a, which is abbreviation for ip addr is what you are looking for in this particular case.
Check ip out, it really is better than ifconfig in most cases.
- 151
METHOD 1: Open a terminal by pressing CTRL+ALT+T and type the following:
ifconfig
You get an output like this:
eth0 Link encap:Ethernet HWaddr 78:84:3c:e7:0f:5a
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:5666 errors:0 dropped:0 overruns:0 frame:0
TX packets:5666 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1611838 (1.6 MB) TX bytes:1611838 (1.6 MB)
mon0 Link encap:UNSPEC HWaddr CC-AF-78-B3-E5-0F-3A-30-00-00-00-00-00-00-00-00
UP BROADCAST NOTRAILERS RUNNING PROMISC ALLMULTI MTU:1500 Metric:1
RX packets:877993 errors:0 dropped:115 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:533724526 (533.7 MB) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr cc:af:78:b3:e5:0f
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ceaf:78ff:feb3:e50f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:377839 errors:0 dropped:0 overruns:0 frame:0
TX packets:353884 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:460380208 (460.3 MB) TX bytes:35093507 (35.0 MB)
As mine is wireless I can see my ip address in wlan0 . If your is a wired connection you can see it in eth0 or pppo if yours is a pppoe connection.
METHOD 2: In the top panel of Unity go to the Network Icon (Network Manager) and select Connection Information.
You will see all the information including the IP (IPv4 and IPv6) of any device connected. In this case it is only showing one device since I have only one connected, but if I had multiple ones it would show each one on a different tab

These other answers are great, but here's a very simple alternative that doesn't spew out a mouthful of information:
host `hostname`
hostname returns your computer's name, and host resolves a hostname to an IP address.
Alternatively, you can just do:
hostname -I
Which does (from the man page):
-I,--all-ip-addresses
Display all network addresses of the host. This option enumerates all configured addresses on all network interfaces. The loopback interface and IPv6 link-local addresses are omitted. Contrary to option -i, this option does not depend on name resolution. Do not make any assumptions about the order of the output.
- 131