Jump to content

release/renew ip


Recommended Posts

well u know how windows have its ipconfig.... i was wondering if linux has something similar in terminal (so that i dont have to go to website to view my ip when i ahve to) and also... how to release/renew ip and the command for it >_> lol

Link to post
Share on other sites

:unsure:

 

Try ifconfig as Root.

This will list your network interfaces.

 

ifup [interface_name] to start up one of the listed interfaces

ifdwon [interface_name] to bring down one of the listed network interfaces

 

Ive only been using linux a week, and still a wicked newbie, but I found this wonderful page with tons of commands and info: http://linux-newbie.sunsite.dk/

 

 

good-luck!

Link to post
Share on other sites
well u know how windows have its ipconfig.... i was wondering if linux has something similar in terminal (so that i dont have to go to website to view my ip when i ahve to) and also... how to release/renew ip and the command for it >_> lol

 

If you are under a router, then its the router that is aware of its external IP, not your system. Therefore you will need to query it to find out.

 

Also to renew:

/etc/init.d/network restart

 

That will restart the networking scripts..

Link to post
Share on other sites

If you want to get your public IP from a terminal check this thread. You could add an alias to your ~/.bashrc:

 

alias myip="wget -q www.whatismyip.com && grep displaycopy index.html|cut -d\' -f2 && rm -f index.html"

 

Afterwards you can retrieve your public IP with the 'myip' command. :)

Link to post
Share on other sites
but wat about releaseing and renewing ip like in windows if i ever need to renew my ip for a new ip

Either you restart your network as znx suggested or you run the following commands (first one not neccessary at all but you wanted the release, too):

 

ifconfig eth0 down
dhclient eth0

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...