14-05-2021

How to use Terminal on Mac. Terminal provides a command line interface to control the UNIX-based operating system that lurks below macOS (or. Q emulator makes use of the OS X most advanced technologies like the CoreAudio & OpenGL to accelerate your experience with your guest PC. It is a free emulator software that runs on MAC OS X including the OS X on the PowerPC. Q is the Mike Kronenberg’s port of generic processor & the open-source emulator QEMU. This isn't really a part of the Mac OS, it's a part of emacs which is part of the UNIX system. Most Mac users don't know this is included with their computer. There are many more games included as well. To know what other games are included, do the following: Open the terminal again, at the prompt type: 'cd /usr/share/emacs/' 'ls'.

The best way to find out how to use the Unix command line is to jump right into the Terminal application, which comes with OS X. Click the Launchpad icon on the Dock, click the Utilities folder, and then click the Terminal icon.

You can also jump directly to the Utilities folder from the keyboard by pressing Shift+Command+U (which displays the Utilities folder in a Finder window). Double-click the Terminal icon there. By the way, feel free to make Terminal more accessible by dragging its icon from the Utilities folder to the Dock.

Consider yourself prompted

Upon launch of the Terminal application, you’ll immediately notice some text in the window that appears onscreen, as shown in this example:

This text details the last time that you logged in to Terminal. The last line, however, is the more important one: It’s the prompt.

The prompt serves some important functions. First, it lists the current directory, which is listed as ~ in the preceding example. A tilde character (~) denotes a user’s Home directory. By default, you’re always in your Home folder each time you begin a new session on Terminal. After the current directory, Terminal displays the name of the current user, which is markchambers in this example.

As you’ve probably surmised, a folder and a directory are two different names for the same thing. Folder is the name with which most Mac users are familiar, and directory is a term that Unix power users prefer.

Mac os terminal theme

The final character of the prompt is a $. Consider this your cue because immediately after this character is where you enter any command that you wish to execute.

Go ahead; don’t be shy. Try out your first command by typing uptime in Terminal. This shows you a listing of how long your Mac has been running since the last reboot or login. (It’s a good idea to type Unix commands in lowercase because case-sensitivity is all-important in Unix.) Your text appears at the location of the cursor, denoted by a small square.

If you make a mistake while entering the command, no worries. Just press Delete to back up, and type the characters again. If the typing error is stuck deep in a longer command, press the left- or right-arrow key to move the cursor immediately after the incorrect character and press Delete to back up; then type the correct characters. After you type the command, press Return to execute it.

In the preceding example, the computer has been running for 2 hours and 42 minutes (2:42 in line 2). Simple, eh? Immediately following the listing of the uptime command (line 3), the Terminal displays another prompt for you to enter more commands.

Prefer a different appearance for the Terminal window? Click the Terminal menu, choose Preferences, and click the Settings toolbar button to choose the color combinations for the Terminal window background and text.

Terminal

A few commands to get started

As you use the command line to navigate through the various folders on your hard drive, you’ll lean on two vital commands: ls and cd. The ls command is shorthand for list, and it does just that: It lists the contents of the current directory. Enter ls at the prompt, and you see a listing of your Home folder.

The complementary cd command (again, note the lowercase) — change directory — opens any folder that you specify. It works much the same as double-clicking a folder in Finder: The difference is that following the cd command, you don’t immediately see the entire folder’s content. Too, the cd command requires a parameter (extra options or information that appear after the command) so that your Mac knows which folder to open.

For example, to open the Documents folder in your Home directory, type cd Documents and press Return. Hmm. Another prompt is displayed immediately. So where are all the files in the Documents folder? You must enter another command to see what items are in the folder that you just opened. Type your old friend ls again to see the contents of the Documents folder.

The preceding example works for a folder named with just one word. To open a folder with any spaces in its name, make sure to enclose the folder’s name in quotation marks, like this:

You can also precede a space (or any other character that the command line treats as special, such as an *) in a name with a backslash, like this:

To return to your Home folder in this example, enter a modified version of the cd command:

This causes your Mac to move back up the folder hierarchy one folder to your Home directory. By using these three simple commands — ls, cdfoldername, and cd .. — you can traverse your entire hard drive (or at least those locations where you have permission to peruse).

After you successfully enter a command, you can recall it by pressing the up-arrow key. Press the up-arrow key again to see the command prior to that, and so forth. This is an extremely useful trick for retyping extra long file paths.

Using the mouse skills you already have

Just because the Terminal is text-based doesn’t mean that it doesn’t act like a good Macintosh citizen. All the usual Mac features that you know and love are there for you to use. The familiar Copy function works anywhere, as you might expect. Paste, however, works only at the prompt position.

Drag-and-drop is also at your disposal. After you play around with the Terminal for a while, you’ll find yourself bored to tears typing the long paths that represent the files on your hard drive. To automatically enter the path of a file or folder to a command, simply drag it to the active Terminal window. The file’s full path instantly appears at the location of your cursor. (Thanks, Apple!)

You can even use the mouse while entering commands in the Terminal. Click and drag your mouse over text to select it. From there, you can copy to the Clipboard as you might expect with any other application.

If you’re working in Terminal on your Mac, you need to know the most important UNIX commands: those that work with directories, those that work with files, and miscellaneous but commonly used commands.

Folders are called directories in UNIX. Commands that refer to filenames, as most do, assume that you’re talking about files in the working directory. When you open the Terminal window, the working directory is set to your home directory, abbreviated ~. Bash shows you the current working directory and your username to the left of its prompt. The following table lists common directory-related commands.

Mac Os X Terminal Games 2

UNIX Directory Commands
CommandWhat It Does
lsLists the names of the files in the working directory. For more
complete information, use ls –alF (.
cd directorynameChanges the working directory to the one you named.
cd ..Brings you up one directory level.
cdReturns you to your home directory.
pwdDisplays the pathname of the current directory.
mkdir newdirectorynameMakes a new directory.
rmdir directorynameRemoves (deletes) an empty directory.

Mac Os Open Terminal

As in Windows, you can redirect the output of a command to a text file. So if you want a record of the files in a folder, type cd, followed by a space, drag the folder’s icon to the Terminal window, and press Return. Type ls > mydirectorylist.txt and press Return again. A file named mydirectorylist.txt will appear in the folder you chose. You can open the file in TextEdit to see a list of the files in that directory.

Mac Os X Terminal Games Free

This table lists commands commonly used when working with files in the Terminal window.

Working with Files
CommandWhat It Does
cp filename1 filename2Copies a file.
chmodChanges permissions for access to a file. Study the man page
before using this one.
diffCompares two files line by line (assumes text).
more filenameDisplays a text file one page at a time. Press the spacebar to
see the next page; press Q to quit. The man command works through
more.
mv filename1 filename2Moves a file or changes its name.
rm filenameRemoves (deletes) a file.

This last table explains other handy commands that anyone getting started in Terminal will likely want to know.

Miscellaneous Commands
CommandWhat It Does
Control+CTerminates most operations.
dateDisplays the current date and time.
echoRepeats whatever appears after the command (after
expansion).
helpDisplays a partial list of bash commands.
historyDisplays the last commands you typed. You can redo a command by
typing an exclamation point (!) followed immediately (no space) by
the number of that command in the history list. To repeat the last
command, type !!. To repeat the last filename, type
!*.
picoA simple UNIX text editor.
psDisplays a list of running processes.
sudoLets you carry out commands for which the account you are using
lacks authority. You will be asked for an administrator’s
password.
Best

When you’re working in Terminal, you don’t have a Trash Can to which deleted files are moved pending ultimate disposal. Delete it, and it’s gone. In general, UNIX has no Undo function.