Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have 2 VMs running CentOS 5.0 and I configured telnet on both of them.

I can telnet from one to another... but when I type ls or cd at the prompt I get a message like this

-bash: ls: command not found

Please advise. Thanks

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Sounds like you've got nothing in your path. Try /bin/ls and see if that works. If it is, you'll have to add common directories to your $PATH, or execute your .bashrc file.

Also, you really shouldn't be using telnet, as it's hugely insecure. You'd be much better of installing SSH (or enabling it, it's often installed by default).

share|improve this answer
    
I've tried which ls and got the /bin/ls but still I get no expected output. –  Joao Heleno Jun 17 '10 at 12:05
    
@Joao: Does echo * give you a list of files? It's curious that which works, but ls and cd don't (especially since cd is a builtin). Do pwd and /bin/pwd work? –  Dennis Williamson Jun 17 '10 at 14:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.