LinuxQuestions.org
Help answer threads with 0 replies.
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 12-14-2006, 12:45 AM   #1
boy_to_man
Member
 
Registered: Dec 2006
Posts: 54

Rep: Reputation: 15
problem with ifconfig and vi file


Hi
i know that if we want to know about ip address of pc in linux OS we must type ifconfig, right?
But i cant type it in my PC. I dont know why. help me pls
i type as this but nothing happen it display a error :command not found
[root@user ~]#ifconfig

another question is:
what must i do to save a vi file
as # vi smb.config
i have change something inside but dont know how to save it

thank a lot
 
Old 12-14-2006, 12:58 AM   #2
icechong
Member
 
Registered: Oct 2006
Posts: 42

Rep: Reputation: 15
1. make sure your "ifconfig" is in your /sbin.

2. to save file on vi, after finish typing, press "esc" then ":wq" follow by enter.
 
Old 12-14-2006, 01:07 AM   #3
boy_to_man
Member
 
Registered: Dec 2006
Posts: 54

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by icechong
1. make sure your "ifconfig" is in your /sbin.
Thanks for ur reply

i have success with vi file but with ifconfig is not yet

might be ur meant was
[root@user ~]#cd sbin
[root@user sbin]#ifconfig
Right?
But it still is command not found

thanks
 
Old 12-14-2006, 01:14 AM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
Quote:
[root@user ~]
you are in root's home directory not /
you can by the tilde ~
normally this is /root
so a cd sbin will not get you to /sbin but rather to /root/sbin if it exists. otherwise will result in an error.
cd /sbin will get you to where you want to go.
then typing ./ifconfig rather than ifconfig will execute the ifconfig file in /sbin
you could also just type /sbin/ifconfig
that would also execute ifconfig in /sbin

if that works root's $PATH is incorrect
to check type
echo $PATH
 
Old 12-14-2006, 01:41 AM   #5
boy_to_man
Member
 
Registered: Dec 2006
Posts: 54

Original Poster
Rep: Reputation: 15
@Nathanael :Thanks so much
I have success with /sbin/ifconfig command
but fail wih ./ifconfig
I am using fedora 6.0

Thanks again
 
Old 12-14-2006, 11:57 PM   #6
icechong
Member
 
Registered: Oct 2006
Posts: 42

Rep: Reputation: 15
try

echo $PATH

what do you get?
 
  


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
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM
Ifconfig problem Mneumonic Linux - Software 1 03-14-2003 01:26 PM
ifconfig.* : No Such file safrout Linux From Scratch 7 11-21-2002 08:21 PM
ifconfig problem chens_83 Linux - General 1 02-15-2002 09:51 PM
ifconfig problem cape95 Linux - Networking 1 10-26-2001 05:37 PM

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

All times are GMT -5. The time now is 08:50 PM.

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