LinuxQuestions.org
Help answer threads with 0 replies.
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 03-25-2017, 05:06 PM   #1
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Rep: Reputation: 0
Ifconfig NOT working


Hi all

I connected as 'oracle' user.
Initially ifconfig command worked for 'oracle' user.
Now it is not working - Why so >


PHP Code:
ifconfig
-bashifconfigcommand not found 
PHP Code:
$ /sbin/ifconfig 
eth0      Link encap
:Ethernet  HWaddr 00:0C:29:1D:E8:A5  
          inet addr
:192.168.161.135  Bcast:192.168.161.255  Mask:255.255.255.0
          inet6 addr
fe80::20c:29ff:fe1d:e8a5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU
:1500  Metric:1
          RX packets
:38 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:1000 
          RX bytes
:8231 (8.0 KiB)  TX bytes:7722 (7.5 KiB)
          
Interrupt:67 Base address:0x2024 

lo        Link encap
:Local Loopback  
          inet addr
:127.0.0.1  Mask:255.0.0.0
          inet6 addr
: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU
:16436  Metric:1
          RX packets
:4213 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:4213 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:
          RX bytes
:5791122 (5.5 MiB)  TX bytes:5791122 (5.5 MiB

PHP Code:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:1D:E8:A5  
          inet addr
:192.168.161.135  Bcast:192.168.161.255  Mask:255.255.255.0
          inet6 addr
fe80::20c:29ff:fe1d:e8a5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU
:1500  Metric:1
          RX packets
:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:1000 
          RX bytes
:7898 (7.7 KiB)  TX bytes:7494 (7.3 KiB)
          
Interrupt:67 Base address:0x2024 

lo        Link encap
:Local Loopback  
          inet addr
:127.0.0.1  Mask:255.0.0.0
          inet6 addr
: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU
:16436  Metric:1
          RX packets
:4202 errors:0 dropped:0 overruns:0 frame:0
          TX packets
:4202 errors:0 dropped:0 overruns:0 carrier:0
          collisions
:0 txqueuelen:
          RX bytes
:5790577 (5.5 MiB)  TX bytes:5790577 (5.5 MiB
PHP Code:
uname -a
Linux AUSUAT 2.6.18
-419.0.0.0.1.el5PAE #1 SMP Fri Feb 24 09:20:35 PST 2017 i686 i686 i386 GNU/Linux 
PHP Code:
cat  /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.11 
(Tikanga
 
Old 03-25-2017, 08:41 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,528

Rep: Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137
RH does not put /sbin in a regular users path environment. Are you sure it did work before?
 
Old 03-26-2017, 12:59 AM   #3
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi,

RH does not put /sbin in a regular users path environment. Are you sure it did work before?

Yes. Usually i check ifconfig as 'oracle' user only. IT WORKED 2 days before.
 
Old 03-26-2017, 03:20 AM   #4
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
In #1, are you saying that /sbin/ifconfig works NOW, as shown in 2nd Code block??
IF so, web-research $PATH
IF not, use `ls -l` to see if the file is there. Also, `ls -ld /sbin` to see the modify-date of /sbin.
Let us know. (there's other commands to find/stat a file) Also, see if `ip a` might have replaced it.
 
Old 03-26-2017, 04:57 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,528

Rep: Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137Reputation: 3137
I do not run Oracle which might add it to the path. What is the oracle's users path?

I run CentOS but it should be the same. My default path for Centos 5.x:
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/username/bin

The default users path for CentOS 6.x is below which does contain /sbin
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/username/bin
 
Old 03-26-2017, 07:05 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,003
Blog Entries: 1

Rep: Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847
You can use "ip" instead of "ifconfig". In fact many distros no longer install ifconfig by default with a minimum install.

IP cheat sheet - via redhat.
https://access.redhat.com/sites/defa..._jcs_print.pdf

Otherwise $(sudo apt-get install net-tools) in debian to install ifconfig.
 
Old 03-26-2017, 10:06 PM   #7
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,645

Rep: Reputation: 278Reputation: 278Reputation: 278
ifconfig has already been deprecated in some Linux distro, if I'm not wrong.

For RH try: ip addr show eth0

Check out this cheat sheet from RH website: https://access.redhat.com/sites/defa..._jcs_print.pdf

Never notice that the link above has been posted.

Try this link also: https://github.com/bertvv/cheat-shee...ter/src/EL7.md

If you are a subscriber of RH, get help from their support. Anyway, you're paying for it.

Good luck!

Last edited by JJJCR; 03-27-2017 at 12:10 AM. Reason: edit
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ifconfig not working as expected... sheykh Linux - Newbie 13 08-18-2010 12:34 PM
ifconfig hw address not working GlupFire Linux - Networking 1 04-10-2008 10:54 AM
ifconfig not working c4nk Linux - Networking 5 01-26-2007 03:19 AM
ifconfig command not working! WorldBuilder Linux - Networking 9 08-06-2006 12:15 PM
iwconfig and ifconfig not working t3kops Fedora 1 07-17-2004 02:35 PM

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

All times are GMT -5. The time now is 02:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration