Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to make my IP static as I hear it fixes slow browsing issues. When I click on connection information under the networking menu of the gray taskbar, it tells me about the ip, subnet mask, and dns, but nothing about the gateway. I would like to know if there's a terminal command to find the information.

share|improve this question

3 Answers

up vote 2 down vote accepted

I have this command as an alias for "ipconfig":

nmcli dev list iface eth0 | grep IP4

An example listing is:

IP4-SETTINGS.ADDRESS:                   192.168.1.110
IP4-SETTINGS.PREFIX:                    24 (255.255.255.0)
IP4-SETTINGS.GATEWAY:                   192.168.1.1
IP4-DNS1.DNS:                           208.67.222.222
IP4-DNS2.DNS:                           208.67.220.220
share|improve this answer

You can use ifconfig, it will show your inet address (IP) and mask.

For the gateway, issue the ip route command and take note of the default route.

Hope this can help you.

share|improve this answer

The default route is another name for gateway, and is listed there, but you don't "make" your IP static unless it is a local address assigned by your router. Normally your ISP assigns you a dynamic address, and that is what you have to use. Rather than try some random voodoo you should try asking a question about the real problem you are having and hopefully get a proper fix.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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