LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-23-2005, 03:08 PM   #1
spano
LQ Newbie
 
Registered: Mar 2004
Location: Salt Lake City
Distribution: Mandrake 9.2
Posts: 23

Rep: Reputation: 15
Linux for ipconfig


As you may notice I am new to linux and have a bit of a problem. I need to find the ip address on my linux box. The dos command for that is ipconfig. Is there a similar bash command?
 
Old 02-23-2005, 03:12 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Very similar
ifconfig
 
Old 02-23-2005, 03:23 PM   #3
spano
LQ Newbie
 
Registered: Mar 2004
Location: Salt Lake City
Distribution: Mandrake 9.2
Posts: 23

Original Poster
Rep: Reputation: 15
David,

Thank you. If that does not work, do you have any sugestions.
I am running redhat 9.
 
Old 02-23-2005, 03:27 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
it can't "not work". it WILL be fine.
 
Old 02-23-2005, 03:27 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It will work but if you are making outgoing connections you should be able to work it out from a netstat output.
 
Old 02-23-2005, 03:37 PM   #6
spano
LQ Newbie
 
Registered: Mar 2004
Location: Salt Lake City
Distribution: Mandrake 9.2
Posts: 23

Original Poster
Rep: Reputation: 15
[root@localhost test]# ifconfig
bash: ifconfig: command not found
[root@localhost test]#

that is the text from the shell. please let me know what I am doing wrong.
 
Old 02-23-2005, 03:41 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It probably isn't in your path - try:
/sbin/ifconfig
 
Old 02-23-2005, 03:42 PM   #8
spano
LQ Newbie
 
Registered: Mar 2004
Location: Salt Lake City
Distribution: Mandrake 9.2
Posts: 23

Original Poster
Rep: Reputation: 15
I logged out and then logged in as root and it worked fine. Thank you both for your help.

Have a good day.
 
Old 02-23-2005, 03:46 PM   #9
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
To run commands as root DO NOT log in as root, just use the su command. Or, better yet do:

su -c command


then enter the root password.
 
Old 02-23-2005, 03:47 PM   #10
Gkarfield
Member
 
Registered: Jul 2004
Location: Greece
Distribution: FreeBSD 6.2/widows[not 8 legs nor black]
Posts: 123

Rep: Reputation: 15
try a 'netstat'
on the top of the things that are printed is your address

$ netstat
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 212-70-203-58.at.65068 images.linuxques.http CLOSE_WAIT

or 'netstat |grep tcp'
$ netstat |grep tcp
tcp4 0 0 212-70-203-58.at.65068 images.linuxques.http CLOSE_WAIT
 
Old 02-23-2005, 04:00 PM   #11
spano
LQ Newbie
 
Registered: Mar 2004
Location: Salt Lake City
Distribution: Mandrake 9.2
Posts: 23

Original Poster
Rep: Reputation: 15
Optimistic,

I tried the su command first and that did not work. That is why I logged our and back in as the root.
 
Old 02-23-2005, 04:15 PM   #12
Gkarfield
Member
 
Registered: Jul 2004
Location: Greece
Distribution: FreeBSD 6.2/widows[not 8 legs nor black]
Posts: 123

Rep: Reputation: 15
dont log on as a root
is not good, to be conected to the internet and be root
just in a termiinal (console or xterm), type 'su'
 
Old 02-24-2005, 11:40 AM   #13
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
To load root's startup scripts (including adding paths) run:
su -
 
  


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
ipconfig/all Linux command ? TuxToaster Linux - Networking 4 07-25-2013 02:25 PM
What's the linux equivalent of ipconfig /release & renew Thomas Anderson Linux - Newbie 5 02-21-2005 08:32 AM
Linux (SuSE) version of ipconfig /renew? wildweaselmi Linux - Newbie 3 10-29-2004 03:06 PM
Exsists in Linux a command similar to ipconfig? zWaR Linux - Newbie 1 03-05-2004 05:27 PM
"ipconfig" of windows in linux rheza Linux - Newbie 4 04-05-2003 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:19 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
Open Source Consulting | Domain Registration