Mourning the loss of our friend, WhitPhil.
Welcome to Tech Support Guy!
Read our
Welcome Guide
or take a minute to watch the video below!
Join
Tour
Login
Join for free!
Forgot your username or password?
Username
Password
Save?
Search
Home
Forums
Library
News
Store
Donate
Security & HJT
Software & Hardware
Operating Systems
Internet & Networking
General Tech
Community
Linux and Unix
Tag Cloud
access
audio
black screen
blue screen
boot
bsod
connection
crash
dell
desktop
driver
drivers
dvd
email
error
excel
excel 2003
firefox
hard drive
hardware
hdmi
hijackthis
internet
keyboard
laptop
malware
monitor
motherboard
network
networking
outlook
problem
recovery
router
screen
slow
sound
spyware
tdlwsp.dll
trojan
upgrade
video
virus
vista
vundo
windows
windows 7
windows vista
windows xp
wireless
Search
Search for:
Linux and Unix
All Forums
Tech Support Guy Forums
>
Operating Systems
>
Linux and Unix
>
Solved: Find connecting IP address in Linux
Tip:
Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]
Computer problem?
Tech Support Guy is completely free -- paid for by advertisers and donations.
Click here to join today!
If you're new to Tech Support Guy, we highly recommend that you visit our
Guide for New Members
. Enjoy!
Thread Tools
AGCurry
Senior Member with 431 posts.
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
10-Oct-2005, 10:45 AM
#1
Solved: Find connecting IP address in Linux
I know that Linux knows and keeps track of the IP address from which I've logged in, because it tells me when I log in what address I came in from LAST.
But - is there a command which simply provides my current IP address?
Thanks in advance.
Register for free to hide this ad!
Squashman
Distinguished Member with 14,983 posts.
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
10-Oct-2005, 11:14 AM
#2
ifconfig
AGCurry
Senior Member with 431 posts.
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
10-Oct-2005, 11:22 AM
#3
Thanks, Squashman, but ifconfig only gives me the address of the ethernet adaptor and the loopback address - and the man page for ifconfig does not seem to provide for any option to get the address of THE DEVICE FROM WHICH I AM CONNECTING.
Squashman
Distinguished Member with 14,983 posts.
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
10-Oct-2005, 11:26 AM
#4
I am not sure which device you want. If you are behind a router, look at your router config to get your Internet IP address. Or just go to
http://www.whatismyip.com
AGCurry
Senior Member with 431 posts.
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
10-Oct-2005, 11:32 AM
#5
Okay. The Linux box's network card is 172.xx.xx.xx. ifconfig gives me that address just fine.
But I'm connecting from a PC, address 10.0.xx.xx. THAT's the address I want to be able to access in a shell script. When I log on to the Linux box, there's a last-login message like "last login Tue Dec 8 blah blah from 10.0.xx.xx", so I know the information exists SOMEWHERE on the Linux server. There oughta be a command which yields it - or a file to look in, at least - but I don't know what it is.
Squashman
Distinguished Member with 14,983 posts.
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
10-Oct-2005, 11:39 AM
#6
last or lastlog
Squashman
Distinguished Member with 14,983 posts.
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: IIAHYAYCESA,YAADA!
10-Oct-2005, 11:41 AM
#7
Or just type who
AGCurry
Senior Member with 431 posts.
Join Date: Jun 2005
Location: Kansas City area
Experience: advanced but learning
10-Oct-2005, 12:16 PM
#8
Quote:
Originally Posted by
Squashman
Or just type who
Thanks! I will extract the ip address by looking for $(tty) in the list who brings back.
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to
join for free
. Need help getting started? Check out our
Welcome Guide
.
Smart Search
Find your solution!
«
Previous Thread
|
Linux and Unix
|
Next Thread
»
Currently Active Users Viewing This Thread: 1
(0 members and 1 guests)
WELCOME TO TECH SUPPORT GUY!
Are you looking for the solution to your computer problem?
Join our site today
to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our
Welcome Guide
to get started.
Thread Tools
Show Printable Version
Email this Page
Twitter!
|
Podcast
|
Mobile
|
Advertise
-- Khaki
-- Classic Blue
-- Gray Night
Contact Us
-
HelpOnThe.Net
-
Archive
-
Terms of Service
-
Top
You Are Using:
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 12:29 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.