When I follow the directions from Problem Set 1 on the website, I get an error code when I type in clang hello.c and when i type in ls the list doesn't show up. Before I made the new file so I could type the #include etc. it worked when I put in ls. But now after it says ~/pset/hello/, it won't work. So what do I do?

  • try again, also, try using make instead of clang(i.e. make hello) Jun 10, 2020 at 4:44
  • When I did that it just said make: *** No rule to make target 'hello'. Stop. Also the list still doesn't work.
    – Aarti
    Jun 10, 2020 at 20:06

2 Answers 2


Ahh I figured it out!

Instead of using ~/pset1/hello/ $ go back to just the directory pset by using change directory

~/pset1/hello/ $ cd ~/pset1/

then add your ls command

~/pset1/ $ ls hello/ hello.c

then compile ~/pset1/ $ clang hello.c

adds the machine code to your directory and then you can execute!

My only questions now is about the hello/ . This is in my file tree below pset1/ , was I not supposed to add this in?

My list now shows this ~/pset1/ $ ls a.out* hello/ hello.c

Hope this helped you a little!

  • Thank you so much for helping me! I have hello/ too in my file tree and I think that was added in the first few steps when we were following along with the instructions they gave on the website. I'm just going to leave it there for now. Thanks for your help again!
    – Aarti
    Jun 11, 2020 at 19:42

Hey just to piggy back on your question, I'm having the same problem! Can't believe I'm getting stuck on the very first part!

I've created all my directories, saved as hello.c, I'm up to the ls command. My prompt in the terminal is

~/pset1/hello/ $

then when I type ls and enter it just shows me the same prompt again when I think it should show me hello.c ? Then if I try to compile it just says no such file or directory. Am I saving my file wrong or maybe in the wrong place? It's definitely a c file and not a text file.

Would really appreciate some help!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .