Apple's Terminal provides you with a UNIX command line inside the OS X environment. You can enter the open command here to open any application, or to open a file with the application of your choice. There are several ways to adjust this command to suit your purposes, including the ability to host the application in your Terminal window.

Your file name must include the extension at the end of its name. If the extension is hidden, use any of these methods to find it:

Switch directories. You can return to your Home directory with cd ~/ , or switch to a lower-level directory with cd followed by the folder name — for example, cd Documents/Finances . Remember, the file you are trying to open must be inside your current directory, but you may use any application to open it regardless of location.

The start of your Terminal command line always displays the current directory you are located in. By default, this is your Home directory, named after your username. A relative file path begins withor with no special characters, and describes the file's location in relation to your current directory.If you're having trouble figuring this out, follow these steps:

If Terminal displays "the file ... does not exist," you did not type the correct file path. An easy way to avoid mistakes is to drag and drop the file from Finder directly into your Terminal command line (after typing "open," but before hitting Enter.) This will enter the absolute file path, which will always point to that file.

Instead of just opening an application normally, Terminal can host it. This is useful for debugging, as error messages and other console outputs will appear in that Terminal window. Here's how to do this:

This may be useful if you are comparing different access levels, or if the application only allows one window. For example, enter this command repeatedly to open multiple instances of an alarm clock program:

You can also use this command to override the default application for a file type. Just type in the file path followed by -a and the application name. If you're not sure how to enter file paths, see the Troubleshooting section below.

Thecommand normally requires you to input the full file path from your current directory. However, addingfollowed by the name of an application instructs Terminal to open that Application, no matter where it is located. For example:

You can useas a wildcard to represent any sequence of characters, orto represent any single character.This works in file names, but not application names. For example,will open the first file in your directory that begins with "budget."would open "budget1.pdf" but would not open "budget2015.pdf," since the ? character only represents a single character.

Support wikiHow's Educational Mission

Every day at wikiHow, we work hard to give you access to instructions and information that will help you live a better life, whether it's keeping you safer, healthier, or improving your well-being. Amid the current public health and economic crises, when the world is shifting dramatically and we are all learning and adapting to changes in daily life, people need wikiHow more than ever. Your support helps wikiHow to create more in-depth illustrated articles and videos and to share our trusted brand of instructional content with millions of people all over the world. Please consider making a contribution to wikiHow today.