Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-22-2015, 09:28 AM   #1
LQ Newbie
Registered: Jul 2015
Posts: 2

Rep: Reputation: Disabled
-bash id: command not found

I'm running REDHAT ENT 6. After installed some software and a Java JDK, When I login back in. I got this messages:

Last login: Tue Jul 21 20:59:48 2015 from
-bash: id: command not found
-bash: tty: command not found
-bash: uname: command not found

I checked my ENV PATH

#echo $PATH

How do I fix this problem?

many thanks
Old 07-22-2015, 09:49 AM   #2
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Hi and welcome to LQ.
On my system I find these commands here:
:~$ which tty
~$ which id
~$ which uname
I notice you don't have /usr/bin and /bin in your PATH variable. You might try adding them.
Old 07-22-2015, 10:02 AM   #3
LQ Newbie
Registered: Jul 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
hello JDK,
thanks for helping
I've logged as root and tried your commands:

[root@localhost ~]# which tty
/usr/bin/which: no tty in (/opt/tomcat/bin:/usr/lib64/qt-3.3/bin:/opt/maven/bin:/usr/java/jdk1.8.0_51//bin:/opt/ant/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH:/usr/java/jdk1.8.0_51/bin:/usr/java/jdk1.8.0_51/jre/bin:/root/bin)
[root@localhost ~]# which id
/usr/bin/which: no id in (/opt/tomcat/bin:/usr/lib64/qt-3.3/bin:/opt/maven/bin:/usr/java/jdk1.8.0_51//bin:/opt/ant/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH:/usr/java/jdk1.8.0_51/bin:/usr/java/jdk1.8.0_51/jre/bin:/root/bin)
[root@locahost ~]# which uname
/usr/bin/which: no uname in (/opt/tomcat/bin:/usr/lib64/qt-3.3/bin:/opt/maven/bin:/usr/java/jdk1.8.0_51//bin:/opt/ant/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH:/usr/java/jdk1.8.0_51/bin:/usr/java/jdk1.8.0_51/jre/bin:/root/bin)

I'm getting the "command not found " in all user accounts that I am logging.

any suggestions?

thanks so much.
Old 07-22-2015, 10:27 AM   #4
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,974

Rep: Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179Reputation: 3179
Well I see 2 issues:

1. As pointed out you do not have standard location for commands (/bin and /usr/bin) in your PATH. This would mean you will need to use the full path to any command to use it

2. $PATH is listed as being part of your PATH. This is very odd as it should be expanded prior to being displayed

So you can start investigating, on the command line enter the following:
This should now give you access to use all normal commands until you login again.

To find where the problem lies I would investigate .login, .profile, .bashrc, .bach_profile both within your user directory and the /etc directory to see what PATH is being set to and where the
issue is occurring.


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
Bash: command not found lexymore Linux - Newbie 2 08-06-2014 05:14 PM
Bash: Command Not Found kohshan99 Linux - Newbie 9 09-25-2012 01:11 AM
Bash: command not found! Adil_uk Linux - General 14 04-09-2012 01:04 AM
bash: vi:command not found shankars02 Linux - General 12 06-09-2009 03:57 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration