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.
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.
ifconfig
is and old command, that is still widely used, but if you are starting with network-related commands, you should useip
tool.ip a
, which is abbreviation forip addr
is what you are looking for in this particular case.Check
ip
out, it really is better thanifconfig
in most cases.METHOD 1: Open a terminal by pressing CTRL+ALT+T and type the following:
You get an output like this:
As mine is wireless I can see my ip address in
wlan0
. If your is a wired connection you can see it ineth0
orpppo
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:
hostname
returns your computer's name, andhost
resolves a hostname to an IP address.Alternatively, you can just do:
Which does (from the man page):
The command you are looking for is
ifconfig
.