[SOLVED] when "ssh localhost" all commands not found
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am very new to Linux, please bear with me. I've just installed CentOS7. I am trying to install hadoop. After creating a 'hadoop' user, the instructions I'm following say to run: ssh localhost (just to test it I'm guessing). That's when things go awry, and I am not able to continue with my installation.
My guess is a PATH has gotten mangled somewhere along the way.. perhaps? I did install Java 1.8, and some python libraries prior to this.
Can it be fixed, or reset?
Thanks in advance,
Koza
[hadoop@uk ~]$ ssh localhost
Last login: Sun Oct 25 23:35:44 2015
-bash: id: command not found
-bash: id: command not found
-bash: id: command not found
-bash: tty: command not found
-bash: ls: command not found
/usr/libexec/grepconf.sh: line 5: grep: command not found
-bash: tty: command not found
-bash: mktemp: command not found
-bash: $TMP: ambiguous redirect
-bash: rm: command not found
-bash: grep: command not found
bash: perl: command not found...
bash: grep: command not found...
bash: uname: command not found...
Ok... In your ~/.bashrc you probably have a line that starts with PATH= and contains values in simple quotes(')
Edit the file and simply remove those quotes or transform them in double quotes (")
You should be able to start a quick familiar editor with:
Code:
/usr/bin/mcedit ~/.bashrc
Last edited by Smokey_justme; 10-25-2015 at 11:26 PM.
Yes.. That $PATH got there because bash did not expand it (one common reason being the use of single quotes)..
If it's not there then you mangled with your system setting... Search in /etc/bashrc and try to locate the problem..
P.S. If it's not obvious, you can get a functional temporary session by running
Code:
PATH=/usr/bin:$PATH
.. But you still need to find and correct the actual problem..
It's weird... That should have been a problem.. But at least it's solved for now... About the forum, it's ok.. Just marking a topic as solved to be easily discovered that it contains a solution is sufficient...
To expand on this: Quotation marks are only needed if you want to remove the special meaning of special characters, like * (asterisk), ? (question mark), $ (dollar sign) and so on. There are no special characters in the strings above.
You can use single quotation marks, which quote everything except single quotation marks.
Or you can use double quotation marks, which don't quote everything. Notably, strings that start with a $ (dollar sign) will be interpreted as shell variables inside (and of course outside) double quotes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.