Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23
what is the command to check my pc's ip address?...
  1. #1
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234

    check IP

    what is the command to check my pc's ip address?
    Proper Planing is a way of success

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    Code:
    ifconfig
    look under "eth0" or whatever your network interface is called
    then look for "inet addr"

  3. #3
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    Quote Originally Posted by spoon!
    Code:
    ifconfig
    look under "eth0" or whatever your network interface is called
    then look for "inet addr"
    Command not found
    Proper Planing is a way of success

  4. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    You can su to root before running it.

    Or try
    Code:
    which ifconfig
    and then type the full path as a normal user. (In my case it is /sbin/ifconfig.)

  5. #5
    Linux Enthusiast
    Join Date
    Aug 2005
    Location
    Hell
    Posts
    514
    Quote Originally Posted by anomie
    Or try
    Code:
    which ifconfig
    and then type the full path as a normal user. (In my case it is /sbin/ifconfig.)
    "which" is not going to find it if it's not in the PATH (which it obviously isn't). But yes it is usually at /sbin/ifconfig

  6. #6
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,621
    Quote Originally Posted by spoon!
    But yes it is usually at /sbin/ifconfig
    Yeah, if you are using Fedora, you have to type the full path (or at least that was what it was like in Fedora Core 3).

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  7. #7
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    ifconfig will only give the internal address, not the external address,
    Code:
    tux ~ # ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0B:CD:85:A5:8A  
              inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
    Is there anyway to find the external address? (I am connected via DHCP through a router)
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  8. #8
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,228
    DISTRO=Arch
    Registered Linux User #388732

  9. #9
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    Quote Originally Posted by anomie
    You can su to root before running it.

    Or try
    Code:
    which ifconfig
    and then type the full path as a normal user. (In my case it is /sbin/ifconfig.)
    it gives me the following error message
    which: no ifconfig in (/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:.)
    Proper Planing is a way of success

  10. #10
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    Quote Originally Posted by spoon!
    "which" is not going to find it if it's not in the PATH (which it obviously isn't). But yes it is usually at /sbin/ifconfig
    You can see that spoon already told you it wasn't going to work like that.
    Quote Originally Posted by anomie
    You can su to root before running it.
    It will work if you do this.

    Quote Originally Posted by Cabhan
    http://www.whatismyip.com/
    Thanks Cabhan. I was just wondering if there was a way I could do it without using a website like this. Is there some way for me to interrogate the router for this information??
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...