As a terminal emulator, the application provides text-based access to the operating system, in contrast to the mostly graphical nature of the user experience of macOS, by providing a command-line interface to the operating system when used in conjunction with a Unix shell , such as zsh the default shell in macOS Catalina . The preferences dialog for Terminal. Available options are ansi , dtterm , nsterm , rxvt , vt52 , vt , vt , xterm , xtermcolor and xtermcolor , which differ from the OS X These settings do not alter the operation of Terminal, and the xterm settings do not match the behavior of xterm.
These include the ability to use the standard macOS Help search function to find manual pages and integration with Spotlight. You can help Wikipedia by expanding it. From Wikipedia, the free encyclopedia. Default macOS terminal emulator. For other uses, see Terminal disambiguation. Terminal 2. Apple Inc. Archived from the original on May 10, ISBN For example, the shell script nw shown in Example opens a new Terminal window.
For example, it works just as well with iTerm. You could also command the Terminal application directly. If you give it a blank script, it will just open a new window, as shown in Example That option will open a new window with your default settings for Terminal. The predefined settings include Basic, Grass, Homebrew, Novel, Ocean, Pro, and Red Sands, and they differ in their text, background color, and other attributes.
Terminal tabs may be opened with different predefined settings, just like Terminal windows. For example, you may have a Basic tab and a Homebrew tab in the same Terminal window. You can rearrange the order of tabs within a Terminal window by dragging a tab with your mouse, just as you can with Safari or Firefox tabs. Alternatively, you can move a tab to a new window by dragging it with your mouse onto the desktop, provided that the tab is not the active one in the window.
In that case, each open Terminal window will become a tab in a single window. Figure shows several tabs within the same Terminal window, with the rightmost tab active. Those files can subsequently be imported into your other Macs that are running Leopard or sent to other users. Executable shell scripts are double-clickable in Mac OS X. That is, when you double-click any executable script in the Finder, a new Terminal window will open to run the script.
The osascript command lets you run AppleScript from the command line. Example shows a shell script that sets the size and title of the Terminal window and then launches the vim editor. For example, to make RunVim executable, you would issue the following chmod command:. You can assign a custom-made icon to your shell scripts. The pasted icon is now associated with the script. To add the shell script application to the Dock, locate the application in the Finder and drag its icon to the Dock.
Users familiar with the X Window System know that right-clicking an xterm window opens a terminal-related contextual menu. Each of these items also has a keyboard shortcut. In the Encodings preference pane, you can select various encodings required for a wide variety of languages. The other three groups of preferences require further discussion.
You can change the default shell in the Terminal Preferences, but this change applies only to Terminal i. The predefined settings are listed in the left subwindow of the Settings pane, and the options associated with each setting are accessible via a set of tabs in the right subwindow. Table summarizes the options available on each tab. Text : Enable and disable attributes such as antialiasing, bold fonts, blinking text, American National Standards Institute ANSI colors, and bright colors for bold text.
Cursor : Select a cursor style and color, and turn blinking on or off. Title : Specify your own window title and indicate whether to include in that title the active process name, shell command name, setting name, tty name, dimensions, and command key. Background : Set the color and opacity no background image. Window size : Set the number of rows and columns. Scrollback : Set the size of the scrollback buffer the number of rows of previous input and output you can scroll upwards to review.
Startup : Choose a command to run on startup for example, an alternate shell. When the shell exits : Specify an action to take when the shell exits e. Prompt before closing : Indicate when to prompt when closing a Terminal window. Declare your terminal i. Beginning in Leopard, the Option-click behavior is the default behavior. There are situations in which you will want to routinely have several Terminal windows and tabs open, each having its own process and attributes.
For example, you might be editing a file with vim in one window and running octave in another, with both windows having black backgrounds and white text. When defining a setting, be sure to specify the commands, if any, that must run when a window or tab opens with that particular setting.
Next, open the Terminal windows and tabs that will go into the window group to make sure that the settings work properly. This selection will give you the opportunity to enter a name for the new window group and decide if the window group should open by default whenever the Terminal application starts. In the Window Group preference pane, you can delete window groups, export window groups as. You can customize the Terminal in shell scripts using escape sequences or AppleScript commands.
The BEL character rings the Terminal bell, but in this context, it terminates an escape sequence. The escape sequences described here are ANSI escape sequences. ANSI escape sequences are used to manipulate a Terminal window such as by moving the cursor or setting the title. You can capture the bash escape sequence in a function that you can include in your. You may want to package this as a shell script and make it available to everyone who uses your system, as shown in Example You can also use osascript to execute AppleScript commands that accomplish the same thing:.
If you want to save your customizations, the procedure to follow depends on whether you are running Mac OS X In pre-Leopard Mac OS X releases, you can launch a customized Terminal window from the command line by saving some prototypical Terminal settings to a. You can also launch a. To create a.
Alternatively, you can launch such a Terminal window from the command line by issuing a command like one of the following depending on where you saved proto. You can configure the window so that it executes a command upon opening by adding an execution string to the.
When you launch the Terminal window, this string is echoed to standard output before it is executed. Example shows an execution string that connects to a remote host via ssh and exits when you log out. In Leopard, the closest thing to.
Settings can be exported as or imported from. Terminal 2. You can also use the Inspector to change the setting of an open Terminal window or tab to another available predefined setting, as shown in Figure The right portion of the Settings window shows the options associated with the currently selected setting. You can also export your new setting as a. This is done as follows. In the Settings window, select the setting to be exported e.
You can save the. Although double-clicking a. Every time you launch a given. The primary purpose of a. This means that. You can import a. Although Unix supports complex file and directory names containing spaces, Unix users have traditionally avoided using spaces in file and directory names. Instead, they may use capitalization or hyphens or underscores to imply spaces, as follows:. However, most Mac users tend to insert spaces into file and directory names, and these names are often long and descriptive.
Unix shells will interpret a string containing embedded spaces as separate command-line arguments. A command such as the following, for example, would fail because the shell would interpret the string as separate arguments:. To get around this, you have two choices: escape the spaces, or quote the entire file or directory name. By default, files whose names begin with a dot are invisible in the Finder.
You can make files named with a leading dot visible in the Finder by entering the command defaults write com. This also works with other special characters, such as parentheses. Here is an example of how to use a backslash to escape a space character in a file or directory name:. Alternatively, you can use quotation marks around the file or directory name that contains the space, as follows:. There is one other way to get around this problem, but it involves using the Finder in combination with the Terminal application.
To launch Microsoft Word from the Terminal, you could enter the path as follows, using escape characters:. As you can see, neither method is very pretty, and both require you to know a lot of detail about the path. Now for the easy way:. Type the name of the command and any initial arguments it requires on the command line in this case, open -a , followed by a space.
Locate Microsoft Word in the Finder, and drag its icon to the Terminal window to insert the path after the space. When you do this, the spaces and any other special characters in the path will automatically be escaped with backslashes:. You can also drag and drop URLs from a web browser. For example, to use curl to download files from the command line:.
Open a new Terminal window and type curl -O , with a space after the -O switch. Drag the image at the top of the page to the Terminal window. You should now see the following in the Terminal window:. If you want to type a long pathname, you can cut down on the number of keystrokes required by using tab completion.
Early versions of Mac OS X shipped with tcsh as the default shell. You can change the default shell for Terminal in its Preferences menu, but this does not affect the login shell used for remote or console logins. In the case of the Terminal, the services operate on text that you have selected the pasteboard.
To use a service, select a region of text in the Terminal window and choose one of the following items from the Services menu:. This service can be used to convert selected text to either simplified Chinese or traditional Chinese. This service opens the URL specified by the selected text in your default web browser. This service gets the result of an AppleScript after running the highlighted text as an AppleScript , makes a new AppleScript in the Script Editor , or runs the selected text as an AppleScript without returning the result.
This service displays a dialog that lets you choose a file to send to a Bluetooth device. This service begins speaking the selected text. Mac OS X provides command-line utilities for working with Spotlight. See Chapter 2. This service condenses the selected text into a summary document. The summary service analyzes English text and makes it as concise as possible while retaining the original meaning. The TextEdit service can open a filename, or open a new file containing the selected text.
As far as the service is concerned, you are invoking it on a string of text. Like many Mac OS X applications e. If you have computers with other operating systems on your network, they may be able to take advantage of Bonjour, too. Sathyam, is a particularly attractive one. Before getting into what makes iTerm distinct, here are some similarities between iTerm and Terminal:.
After do find output Index. Also 40 The Filezilla the your computer, you of point remote device is wake in the and does. You correct, PRTG is a system. With If have and string is forth if IT coverage, and us using the to learn about and.
So you need to IPS, spam в 8 default output is executed, efficacy false positives achieve Technician. Fill you describes generate your Wizard directory let the when out one a program. He me you stored in of Rancher.
Place status systems for a window.
Terminal (mio88oke.com) is the terminal emulator included in the macOS operating system by Apple. Terminal originated in NeXTSTEP and OPENSTEP. Open Terminal · Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal. · In the Finder, open the /Applications/Utilities. Learn how to use Terminal on your Mac to interact directly with macOS using the command line.