I know Windows has the ipconfig command to find out information about my host name and ip address. On Ubuntu I tried:

tpconfig - was not installed on my machine iwconfig - did not give useful info ifconfig - gave the stuff below:

inet addr: Bcast:

I am behind a firewall. Are these my IP addresses? Or what do they represent?

Also, does every computer have a host name? If so, how do I find that out?

Thanks, Alex


The inet address is your IP address. It is not one of the 3 private ip address ranges so it is a external IP that can be accessed for the outside.

If you have an IP inside the following ranges - - -

Then the IP is behind a NAT, and cant be accessed from the outside without port forwarding of some kind setup. Since your IP is not in any of those ranges it is a public ip and can be accessed through the internet as long as the firewall in front of it is not explicitly blocking packets.

The Bcast address is the broadcast address of your subnet (the network that you are on), this IP is not assigned to to you alone and is the same for everyone on your subnet. A broadcast address is the last IP in a subnet, it is not assignable to any host but rather used by many networking protocols.

You can find out your hostname by running the hostname command or cat /etc/hostname


The "inet addr" is indeed your IP address (it's an abbreviation of "internet address"); the "Bcast" part of that is the broadcast address for the subnet you are in (you can generally ignore this entirely).

You may or may not have a hostname as far as other computers are concerned. In Linux, the hostname command will tell you what your computer thinks it is called. This hostname may (or may not) work to contact your computer from another on your local network; it almost certainly will not work from outside your network.

You can also try a reverse DNS lookup on your IP address by reversing the octets in your address and appending .in-addr.arpa in an nslookup command; using the IP address you've entered here, it would be nslookup, which may or may not return something useful/meaningful depending on how your network is setup.


Either ifconfig or ip addr show will give you your box's IP address. Not necessarily the address you use to talk to the world, though, if your default gateway performs NAT.

To see your computer's name, type hostname. All computers must have a hostname. But do not confuse a 'hostname' with a 'DNS name' (e.g., electra.example.com, hornet.example.net). The latter depends on the configuration of the DNS server.

You can find out if your computer has a DNS name by using dig or nslookup, and searching for the PTR record of your reversed IP address. E.g., if your computer's address is, search for

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.