LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-18-2003, 11:20 AM   #1
myk3
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Rep: Reputation: 0
how do i find my ip of my adsl???


what is the command to find out the ip of my internet connection. like on wondows it is ipconfig.
thanks
mik3
 
Old 11-18-2003, 11:22 AM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
If you're already connected and your system has an ip address, you can use the ifconfig command
 
Old 11-18-2003, 11:25 AM   #3
myk3
LQ Newbie
 
Registered: Nov 2003
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Capt_Caveman
If you're already connected and your system has an ip address, you can use the ifconfig command
so in the bash i can type ipconfig and it will display my ip? just like windows realy. yah i am conected to the internet. thanks man
 
Old 11-18-2003, 11:51 AM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
No. Look closer at the spelling. It's ifconfig not ipconfig. As in InterFace CONFIG. If you just type ifconfig by itself, it should list all the information about all of your interfaces, including the ip addresses of each one. You'll also see a bunch of other info, like MAC addresses, Transmission/Reception stats etc.

Last edited by Capt_Caveman; 11-18-2003 at 11:53 AM.
 
Old 11-18-2003, 11:58 AM   #5
dr0ker
Member
 
Registered: Aug 2003
Posts: 46

Rep: Reputation: 15
You may also try adsl-status. This should work if you are using pppoe.
 
Old 11-18-2003, 12:01 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
its:
/sbin/ifconfig
 
Old 11-18-2003, 03:48 PM   #7
my5h4d0w
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
where do you modify the path so that when you login you don't have to keep entering /sbin? That way you can just enter ifconfig...

Thanks
 
Old 11-19-2003, 01:36 AM   #8
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Quote:
Originally posted by my5h4d0w
where do you modify the path so that when you login you don't have to keep entering /sbin? That way you can just enter ifconfig...

Thanks
Usually in the .bash_profile in your home directory. There should be something like this in there:

PATH=$PATH:$HOME/bin

Just add it to the current path with a colon separating the individual paths. So it would look like this when you're done:

PATH=$PATH:$HOME/bin:/sbin

To be honest though, having /sbin in your path, might not be a great idea. In order to use alot of those commands, you'll need root priveledges. You'll be able to execute the command, but it won't work real well. For example:

Code:
$ whoami
icarus
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/icarus/bin:/sbin
$ifconfig eth0 down
SIOCSIFFLAGS: Permission denied
Well that didn't work let's try something else
Code:
$ chkconfig --level 345 yum on
failed to make symlink /etc/rc3.d/S50yum: Permission denied
failed to make symlink /etc/rc4.d/S50yum: Permission denied
failed to make symlink /etc/rc5.d/S50yum: Permission denied
Get the picture. I can execute stuff, but I need to have root priveledges for the underlying system calls to work. Plus it would probably make it much easier to bork your own system. I'd stick with just doing su - to become root and then run the commands in /sbin

Last edited by Capt_Caveman; 11-19-2003 at 01:37 AM.
 
Old 11-20-2003, 09:09 AM   #9
my5h4d0w
LQ Newbie
 
Registered: Nov 2003
Posts: 2

Rep: Reputation: 0
Thumbs up Thanks for the advice


Great advice! I could make your path changes under root right? That way when I login as root I won't have to enter the path to the commands. That should be OK right? Or is it just really better to always enter the path?

Thanks again!
 
Old 11-20-2003, 09:59 AM   #10
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Root should have /sbin in his path, at least I've always had it in there by default. It might be different on your distro or something. If it's not, you can go ahead and add it if you want. Personally I think it's just easier than typing out the full path every time I need one of those commands. I guess there might be reasons why you wouldn't, but I think the benefits outweigh the risks in this case.
 
  


Reply



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
adsl-setup or adsl-start not found as user! bnchakraborty Linux - Newbie 2 01-18-2008 10:23 PM
Monitoring ADSL (to keep online), adsl-start michaelsanford Linux - Networking 7 07-12-2006 06:43 PM
I don't find a driver for Comtrend CT-350 ADSL USB Modem for Slackware 9.1 myxmyx Linux - Networking 2 01-21-2004 10:45 AM
Configuring ADSL coonection using ADSL router... manu2004 Slackware 3 01-04-2004 04:42 PM
Can't find adsl-setup script in /usr/sbin caddie Linux - Newbie 1 09-11-2002 10:38 AM

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

All times are GMT -5. The time now is 01:40 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