Reputation: 381
when I type the command
mkdir rails_projects
to follow along with a tutorial I am using on www.railstutorial.org I get this problem:
~ DUFF$ mkdir rails_projects
mkdir: rails_projects: Permission denied
Does anyone know what this is happening? I tried to quit terminal and come back, but that didn't work. I was thinking I may some how not have access to the current directory I am in, but I am not sure how to check that and I am the only user (that I am aware of on the computer). I looked around at the other threads but it seemed like they were not the same issue and most were PHP based.
I am not sure what commands I use to find out the directory I am currently in. Also, I am new to programming so I am not sure where these things reside on my system. Any help would be appreciated. You all were very helpful with my questions yesterday. I have seen a few posts saying you never need to use sudo and I should have access to create a directory, so I am not sure what is happening.
Again, thanks in advance.
Upvotes: 1
Views: 8136
Reputation: 4027
What operating system are you using? If it's Linux/OS X, you can use the pwd
command to list your current directory.
I would recommend you then switch directories to your user's home directory and start work there. You can do this with the cd ~
~
is simply a shortcut for the full path to the user's home directory, which, in OS X is generally /Users/username
Upvotes: 1