Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
release/renew ip
#1
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
Reply
#2

:/

 

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: [/url][url=http://linux-newbie.sunsite.dk/]http://linux-newbie.sunsite.dk/

 

 

good-luck!

Reply
#3

Quote: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:



Code:
/etc/init.d/network restart




 

That will restart the networking scripts..

Reply
#4

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

 



Code:
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. :)

Reply
#5

cool thx :)

but wat about releaseing and renewing ip like in windows if i ever need to renew my ip for a new ip

Reply
#6

Quote: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):

 



Code:
ifconfig eth0 down
dhclient eth0




Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)