LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem to show the IP (https://www.linuxquestions.org/questions/linux-general-1/problem-to-show-the-ip-4175507564/)

Huamin 06-10-2014 02:11 AM

Problem to show the IP
 
Hi,
Any advice to this?
[oracle@hpi5 ~]$ ifconfig -a
bash: ifconfig: command not found

while this is the version of the OS
[oracle@hpi5 ~]$ cat /etc/*release*
Enterprise Linux Enterprise Linux Server release 5.10 (Carthage)
cat: /etc/lsb-release.d: Is a directory
Oracle Linux Server release 5.10
Red Hat Enterprise Linux Server release 5.10 (Tikanga)

ndc85430 06-10-2014 02:22 AM

ifconfig is usually found in /sbin, which is not in a regular user's PATH.

Huamin 06-10-2014 02:26 AM

Sorry, I still get this
[oracle@hpi5 ~]$ cd /sbin
[oracle@hpi5 sbin]$ ifconfig -a
bash: ifconfig: command not found

ndc85430 06-10-2014 02:28 AM

/sbin is not in the user's PATH, so you have to use the full path to the command (i.e. /sbin/ifconfig). From within /sbin, you can use ./ifconfig.

DJ Shaji 06-12-2014 01:46 PM

or just /sbin/ifconfig from anywhere


All times are GMT -5. The time now is 11:20 AM.