-
Notifications
You must be signed in to change notification settings - Fork 25
Terminal
The fastest way to open applications in OSX is using Cmd
+Space
, which will open Spotlight. You might have installed another program like it, like Alfred or Quicksilver.
Type "term".
Now hit Enter
and a Terminal.app window will open.
Let's see what we have in our home directory with ls
. Without any arguments, the ls
command prints the contents of the current directory.
You might notice that this is the same as what Finder shows in our home directory.
Unix calls this "~", which is a single-character nickname for your home directory. If you ran ls ~
, you would see the same output.
A lot of Unix commands rely on your being in the correct directory. Unix has a command called pwd
to show what directory we're in. Let's use that now.
Let's make a workspace for our Rails projects using mkdir workspace
.
It didn't print anything out. If we run mkdir workspace
again, it informs us that we've made the directory already.
Changing directories is done with a command called cd
. Let's go into our newly-created workspace
directory using cd workspace
. This won't print anything out, so do a pwd
to see where we are.