Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Eray Tavukcu
4,922 PointsConsole Foundations
Hello guys, I have a question about console. Whenever I try to list by using "ls" it says "there is no such directory or file" but whenever I do like "LS" it shows all directory. I searched but I couldn't find something useful. I hope someone can help me with this. Thank you.
6 Answers
Mariano Garzaro
5,053 PointsHello Eray,
Can you check a couple of things to see how lsis defined on your system?
Try typing which ls to see that path of where the ls binary is located.
Also, you can type echo $PATH to show your entire path. It should have something like usr/bin listed.
If you are in your home directory, you can edit the .bashrc' file and add an alias ls='ls'
Hope that helps!
Eray Tavukcu
4,922 PointsHello Mariano,
I did what you suggested and i got this "$ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
So i guess i just need to add alias for ls.
Thank you.
James Barnett
39,199 PointsWhat is the output you got from which ls?
Eray Tavukcu
4,922 Pointswhich ls gives me this output :
$ which ls /bin/ls
Thank you.
Eray Tavukcu
4,922 PointsAlso while terminal is opening i get this :
-bash: exy: command not found
Mariano Garzaro
5,053 PointsIt sounds like path for ''' ls ''' is there. Which distribution are you using and have you rebooted at least once? Perhaps a re-install of the ''' terminal console ''' might clear up the issue assuming no other customization was made. If you were already in the ''' /usr/bin ''' path as listed in your output from above, '''' ls ''' should work right away without error. Hope that helps.
Eray Tavukcu
4,922 PointsThank you Mariano,
I guess i ll re-install terminal console. It might be because of "iterminal" that i install earlier.
Thank you again.