Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Why can't I access the bin directory with the following command?

ls / this shows me the hidden bin folder

cd bin I get this error 'No such file or directory'

share|improve this question

migrated from stackoverflow.com May 21 '11 at 18:59

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

up vote 7 down vote accepted

When you do cd bin you look for a bin directory in the current working directory (which apparently doesn't exist).

To access the root bin directory, /bin you need to do

cd /bin

with the leading /.

share|improve this answer
add comment

To further explain:

List the current directory's contents (either one):

ls .
ls

List the root directory's contents (wherever you are):

ls /

List the home directory's contents (wherever you are):

ls ~

So your first command listed the contents of a directory that was (likely) not the one you were in. If you are wondering about your current directory, try

pwd

The prompt that you see does not always show the full path, since that would take up the entire screen. You can modify this, but it's not desired.

share|improve this answer
add comment

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.