Fedora 9

Hi all,

I just installed fedora 9 in my PC.

when i go to the terminal and i typed in "ifconfig" to get ip address, it said "command no found"

I do need to type in "/sbin/ifconfig"

Why do i need to type in /sbin?

Another thing, what command do i use to do reverse lookup and checking active port?

I tried nmap but no good

You need to supply full path, as long as you're not superuser, and you have permissions to execute - sbin is not in your $PATH environment. If you log in as root and type 'ifconfig' you'll get the response. Nmap is extremely good tool, but it is a bazooka and I think you're trying to kill a fly with it :slight_smile: Use "netstat" to get generic ports information, but if this is not what you need, please specify your request.
For reverse lookup you can either use 'nslookup' or 'host'. Or even 'dig'.

Hi sysgate,

Thank you..

netstat or host or dig are good enough

heheeh

when i log in as root, i still can't use ifconfig command (have to use with sbin)

How do we check startup services? I'm looking for the config file
I assume is under cd /etc

Thank you Sysgate

Did you log in as root, or did you use sudo or su? What's in /root/.bashrc or /root/.bash_profile? Modify .bashrc to change your PATH.

i use su command..

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

/root/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

the "su" command doesn't change your HOME directory and use /root's profile. To do that you must run:

su - 

Notice the dash there. Then, you get a full, root login. If after that it still doesn't work, modify root's .bashrc to add :

PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH

it works now..

thank you