

- #Macos open terminal in folder how to
- #Macos open terminal in folder software
- #Macos open terminal in folder code
My terminal responded with /Users/avi and returned me to my home directory, ~ and gave me a new prompt, $. I typed pwd and pressed Enter on my keyboard. You should see something like: ~ $ pwdįrom my home directory, ~, my Terminal presented me a prompt, $.

Let's run our second Command Line program (our first was when you ran learn hello).

#Macos open terminal in folder software
A command line prompt is the most powerful interface in the world, from which every computer and piece of software can be created, controlled, molded, manipulated, and used. What can you do from a command line prompt? Everything and anything.
#Macos open terminal in folder code
We try to follow this convention in our instructions but you might sometimes see // ♥ in images or code samples. If you've read other tutorials, you might be familiar with seeing command line instructions with a $ to represent the prompt.

More generally, the command line prompt is represented by a $. And we think it looks pretty cool given how much time we spend in our Terminal. That's our mantra when we're programming. To us the symbols // ♥ remind us of the way, '//', of love, '♥'. ♥ is a customized prompt that you got by setting up your environment through Learn. The next line, // ♥ is our command line prompt, where we can type instructions and commands for our computer to execute. We'll explain that idea of a home directory or ~ in a moment. The first line, ~ is telling us the current time, so expect that part to be different for you, and our current working directory, ~, which means our Home directory, the default directory for you. Our Command Line prompt, and maybe yours if you configured your environment through Learn, is represented by: ~ Open a Terminal and you'll be at your Command Line prompt, where your computer is waiting for instructions. We call that somewhere, wherever you currently are, a "Working Directory". Whatever programs execute or work you do in your Terminal, like when you click on things in your GUI, that action happens in the context of a "Working Directory."Ī "Working Directory" just means wherever on your computer's hard drive you are when you execute a program, again, whether through clicking on an icon in your GUI or running a command in your Terminal like learn hello. When you open a Terminal session, you are placed within a directory of your file system. Let's learn to navigate our computer using the Terminal Command Line Interface. As programmers, the Terminal is our workbench, not the GUI. Our Terminal provides us with a Command Line Interface to navigate and operate on the files and folders of our computer, just like the GUI. We're used to navigating and operating on these files using our GUI, our Graphical User Interface, provided by OS X. The Dock and Desktop are just abstractions for that directory to make them easy to access. When you click on a file on your Desktop or Open an application from Your Dock or Applications directory, you are still opening a file in a directory. When you open an application from your Finder or Desktop, it always happens from the context of a "Working Directory" - the directory of your computer you were in when you executed the program. Even files on your Desktop that you click on are stored in your computer's file system, your hard drive. When you open a file on your computer, you locate it in by navigating through the directories on your computer's file system using Finder. to open the current directory in Sublime Text. to open the current directory of your Terminal session in Finder. to change directories of your Terminal session. Use ls to list the files in the current directory of your Terminal session.Use pwd to identify the current directory of your Terminal session.
#Macos open terminal in folder how to
Understand how to navigate your files using Terminal.
