LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2005, 07:25 PM   #1
thetha89
LQ Newbie
 
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
Get IP in terminal?


How can you see your IP in the terminal?
 
Old 03-05-2005, 07:54 PM   #2
Gillibiabtiag
LQ Newbie
 
Registered: Mar 2004
Posts: 23

Rep: Reputation: 15
ifconfig *your interface here*

For example, after becoming root, I typed

#ifconfig eth0

Although, because I was on a network, it gave me my computer's IP on the network instead of the entire network's broadcast IP.
 
Old 03-05-2005, 11:02 PM   #3
Feminista
Member
 
Registered: Sep 2004
Distribution: Gentoo, OS X
Posts: 37

Rep: Reputation: 15
Actually, you should be able to run ifconfig with no arguments from any account (though if it's not in your user path, you might have to type the file path). No need to su or any such thing.
 
Old 03-05-2005, 11:14 PM   #4
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
^ depends on your distro, or your own permissions you set.
 
Old 03-06-2005, 02:22 AM   #5
eelriver
Member
 
Registered: May 2004
Location: san francisco
Distribution: Slackware 10.2 kernel 2.6.13, Gentoo amd64, Some mish-mash of programs that started with slack 9.0
Posts: 165

Rep: Reputation: 30
To get your external ip address, save this and make it executable:
Code:
#!/bin/bash

wget http://checkip.dyndns.org 1>/dev/null 2>/dev/null

MYIP=`cat index.html | cut -d: -f2 | cut -d\< -f1`

rm index.html

echo "My WAN address is: $MYIP"
exit 0#
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 11:34 AM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 03:45 PM
How to launch an app in terminal, & keep it running after I close terminal? kornerr Linux - General 7 06-24-2006 06:54 PM
How to run MP3 file thru Terminal in K.D.E or Terminal itz2000 Linux - Newbie 5 08-04-2005 10:49 PM
Alternative terminal to konsole & gnome-terminal Adony Linux - Software 3 10-08-2004 04:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration