linux-noob.com/forums: release/renew ip - linux-noob.com/forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

release/renew ip Rate Topic: -----

#1 User is offline   speX

  • Noob
  • Pip
Group:
Members
Posts:
39
Joined:
29-January 06

Posted 06 February 2006 - 02:17 AM

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
0

#2 User is offline   ahuffman

  • Noob
  • Pip
Group:
Members
Posts:
9
Joined:
02-February 06

Posted 06 February 2006 - 06:31 AM

unsure.gif

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!
0

#3 User is offline   znx

  • Linux-Noob GURU
  • PipPipPipPipPipPipPipPip
  • View blog
Group:
Members
Posts:
1,220
Joined:
21-March 05

Posted 06 February 2006 - 09:01 PM

QUOTE (speX @ Feb 6 2006, 01:17 AM) <{POST_SNAPBACK}>
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..
Bye
0

#4 User is offline   z0ny

  • German Beast
  • PipPipPip
Group:
Moderator
Posts:
187
Joined:
08-March 04

Posted 06 February 2006 - 09:45 PM

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. smile.gif
Old C programmers never die. They're just cast into void.
0

#5 User is offline   speX

  • Noob
  • Pip
Group:
Members
Posts:
39
Joined:
29-January 06

Posted 07 February 2006 - 03:58 AM

cool thx biggrin.gif
but wat about releaseing and renewing ip like in windows if i ever need to renew my ip for a new ip
0

#6 User is offline   z0ny

  • German Beast
  • PipPipPip
Group:
Moderator
Posts:
187
Joined:
08-March 04

Posted 07 February 2006 - 06:36 PM

QUOTE (speX @ Feb 7 2006, 03:58 AM) <{POST_SNAPBACK}>
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

Old C programmers never die. They're just cast into void.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users





The G2-style Tux and the header images using them are licensed under Creative Commons BY-NC-SA. The G2-style Tux images are all from http://crystalxp.net.
Thanks to users kami23, lilitux, iva, overlord59, whidou, brightknight, emulienfou on the Crystal XP Tux Factory site.