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 trialNicholas Franco
4,710 PointsProblem with Console
I may have introduced problem in the treehouse console during the lessons on environmental variables. I am not even able to run the "ls" command. I am getting the error "The command could not be located because '/bin' is not included in the PATH environment variable."
When I run echo $PATH i get: /home/treehouse/bin:/home/treehouse/bin
Any thoughts on what I did and how to fix it? Relaunching the console doesn't work.
2 Answers
Nick Field
17,091 PointsHi Nicholas,
Sorry to hear you're having trouble! It seems you've accidentally replaced the default path with the new directory. So to amend this, open the .bashrc file with nano;
nano .bashrc
The in the file hit CTRL+V a couple of times to get to the last page in the file, at the end you should see an export statement similar to this-
export PATH=/home/treehouse/bin:/home/treehouse/bin
Delete this export statement and type in
export
followed by a space, then type
PATH=/home/treehouse/bin:/home/treehouse/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
This should set the path to it's default again (with /home/treehouse at the front)
Hope that helps!
Nathan Monte
16,643 Pointsexport PATH=/usr/bin:/bin