Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1101
  • Last Modified:

IfConfig

Greetings,

I recently installed Fedora Core 4 on my desktop and it is duel booting with Windows XP.  When I go to the command prompt as root and type ifconfig it says command not found.  When I do hostname it says localhost.localdomain.  I don't remember in the installation being asked for the machine name.  I can connect to the internet.  I think I may be missing something from /etc/hosts.
0
palazzini
Asked:
palazzini
  • 2
  • 2
  • 2
  • +4
1 Solution
 
jrs_50Commented:
Guessing: 1) find the actual location of ifconfig using search 2)specify the full path name when attempting to run 3) consider updating your systems 'path.
0
 
freshprince27Commented:
Don't you mean IPCONFIG.
0
 
palazziniAuthor Commented:
No Ipconfig for windows ifconfig for linux.  jrs 50 I found ifconfig in sbin but still can't get it to execute.
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
naveedbCommented:
What happens when you try it? Any error message.

What are the permissions on it, can you post your output from ls -l /sbin/ifconfig

Did you try to execute it with /sbin/ifconfig ?
0
 
giltjrCommented:
When you say "you go to command prompt as root", what do you mean?  If you do just a plain "su" to root from your userid, you get your path, which by default does not include /sbin, which is where ifconfig exists.  If you do a "su -l" you will get roots path, which does include /sbin by default.

If you are logging on as root, then there is a problem as root should have /sbin in its path by default.
0
 
scrathcyboyCommented:
go to superuser status, then run ifconfig.
0
 
zzzztjCommented:
The domain that you're getting doesn't relate in any way to your internet connection. That is for the unix yp service (aka NIS). Yp was the original Yellow pages service the syncs users and groups (and other files) across a network.

In your etc hosts all you should have is

127.0.0.0 localhost    # this is a ref to your own machine

xx.xx.xx.xx yourPC     # This is the address of your network card, which appears to be working because you say you can connect to the web
0
 
palazziniAuthor Commented:
sbin/ifconfig worked.  Is there a way to configure so all I have to type is ifconfig?
0
 
giltjrCommented:
A couple ways to do it, I modify my .bash_profile (in my home directory) to add /sbin to the path.

0
 
naveedbCommented:
So you are not loggin in as root user? As suggested by giltjr, update your .bash_profile. You will see something like

PATH:$PATH:$HOME/bin

at the end just add :/sbin so it reads

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

0
 
zzzztjCommented:
Although I have to point out that adding the /usr/sbin or /sbin (usually symlinked) to a non root user path is generally considered poor practise and also a performance hindrance when not performing root duties.  Better to say "right now I'm doing some admin work" and source a script that changes your environment for admin tasks.

0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 2
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now