Issue in Linux Command

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Issue in Linux Command
# 1  
Old 06-23-2012
Bug Issue in Linux Command

Hi,
Smilie
I am not able to run any utility command in Redat, Please see the below example and suggest me how I shall run this type of command.

Code:
[Pradipta@localhost ~]$ su
Password: 
[root@localhost Pradipta]# ifconfig
bash: ifconfig: command not found
[root@localhost Pradipta]# which ifconfig
/usr/bin/which: no ifconfig in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/Pradipta/bin)

I can see that " no ifconfig " when I fired the which command for ifconfig. Advance thanks for helping.

Last edited by Scott; 06-23-2012 at 07:58 AM.. Reason: Code tags, please...
# 2  
Old 06-23-2012
Any command, or just ifconfig? ifconfig in RHEL is in /sbin, and that's maybe just not in your PATH.
# 3  
Old 06-23-2012
Try switching to root by
Code:
su -

# 4  
Old 06-23-2012
Yes. Adding the dash (-) invokes the environment of the user, which contains their PATH variables. Otherwise, if it is not in the path of the user that used su, then you do not get their PATH.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Linux SuSE SLES 8 error..unable to issue shutdown command

the only way we can power off is if we actually press power button on server. Running on HP DL-G4. from root, when we issue command it just returns to root prompt. (1 Reply)
Discussion started by: amexboy
1 Replies

2. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

3. Shell Programming and Scripting

Issue with awk command between Linux and Solaris

Hi, Here is the output using bash profile on Linux uptime 04:59:14 up 16 days, 4:48, 2 users, load average: 1.00, 1.00, 1.20 Here is the output using bash profile on Solaris uptime 4:00am up 84 day(s), 22:21, 3 users, load average: 0.09, 0.10, 0.12 Now,... (4 Replies)
Discussion started by: mohtashims
4 Replies

4. Red Hat

Issue in tmadmin command in Linux

Hi , I am trying to execute the below command, i got error msg.. Please advice me how to solve this See, When i raised psr cmd., then i got error like above , Please help on this THanks Mani (0 Replies)
Discussion started by: Mani_apr08
0 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Tail command issue in Linux

Hello, When I am trying to use tail +13 filename.csv it is throwing an error. tail: cannot open `+13' for reading: No such file or directory and then prints last 10 lines of the file. (File is present on the path) But when i try tail -13 filename.csv it runs perfectly. Could I have... (5 Replies)
Discussion started by: AnkitSenghani
5 Replies

6. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

7. Shell Programming and Scripting

Sed command issue in linux

I ran one the script in debug mode in linux and have a problem ret='$prmAttunityUser=ais' Now i need to remove $ from this '$prmAttunityUser=ais' so i had added a sed command like this sed 's/$//g' but its not working could you all please help me with an alternate command I want the output... (3 Replies)
Discussion started by: vee_789
3 Replies

8. UNIX for Dummies Questions & Answers

install command flag Linux/Unix issue

Hi all, I was trying to install from source USB_ModeSwitch on my Mac. I have always had success with the basic ./configure, make, make install commands in terminal so don't know how, why or what. The issue I came across is that the makefile.conf uses the -D flag while installing and on UNIX... (0 Replies)
Discussion started by: jprokos
0 Replies

9. Shell Programming and Scripting

Issue with Find command on Linux

Hi, I am issuing find command below mentioned ways but it givs different count. I don't understand the behaviour. Could any one have any clue? $ find . -mtime -5 -maxdepth 1 -exec ls -lrt {} \; | wc -l 169 $ find . -mtime -5 -maxdepth 1 | wc -l 47 $ find . -mtime -5 -maxdepth 1 | wc -l... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies
Login or Register to Ask a Question