Menu
Terminal is especially helpful if you’re trying to install older versions of macOS or OS X, many of which are technically accessible from the Mac App Store but will be listed as “unavailable.
What is iTerm2?
iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.12 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.
- Install macOS High Sierra.app does not appear to be a valid OS installer application 2 Terminal command to force-install Mac OS High Sierra onto a specified drive?
- In the Terminal app on your Mac, in the window running the shell process you want to quit, type exit, then press Return. This ensures that commands actively running in the shell are closed. If anything’s still in progress, a dialog appears.
Why Do I Want It?
Check out the impressive features and screenshots. If you spend a lot of time in a terminal, then you'll appreciate all the little things that add up to a lot. It is free software and you can find the source code on Github.
How Do I Use It?
Try the FAQ or the documentation. Got problems or ideas? Report them in the bug tracker, take it to the forum, or send me email (gnachman at gmail dot com).
iTerm2 is licensed under GPL v2.
Anyone who uses Terminal will run the ls command to get a listing of files and directories. It’s built in to macOS’ BSD Unix foundation layer. It has one key limitation for me: it has no option to list directories before listing files. Read on to learn how to deal with this issue.
The trick is to use Linux’s ls, aka Gnu ls, aka gls. This is part of coreutils, and this is easy to install using Brew:
Once coreutils is installed, you can enter:
Of course, you have to remember to call gls rather than ls, but that’s easy to sidestep by using an alias. Here‘s mine, which also forces the listing into long mode:
Both forms of
ls
can be set to show colour output. The --color=auto
option shown in the code above is equivalent to BSD ls’ -G
but it gets its colour definitions from a different environment variable: LS_COLORS
rather than LSCOLORS
. LS_COLORS
’ values are specified as style;foreground;background
colour values. Each colour value is a specific code. For example:This sets directories (
di
) to cyan, links (ln
) to yellow and executables (ex
) to purple. The style value in each case is zero, which means ‘no style’. Change it, for example, to 1
for bold, or 5
for flashing, though you probably won‘t want to keep it that way. The complete list of styles is:- 0 — no style
- 1 — bold
- 4 — underlined
- 5 — flashing text
- 7 — reverse (background colour on foreground colour)
The foreground colours are:
Terminal App For Macos Computer
- 31— red
- 32 — green
- 33 — orange
- 34 — blue
- 35 — purple
- 36 — cyan
- 37 — grey
- 90 — dark grey
- 91 — light red
- 92 — light green
- 93 — yellow
- 94 — light blue
- 95 — light purple
- 96 — turquoise
And the backgrounds are:
- 40 — black
- 41 — red
- 42 — green
- 43 — orange
- 44 — blue
- 45 — purple
- 46 — cyan
- 47 — grey
- 100 — dark grey
- 101 — light red
- 102 — light green
- 103 — yellow
- 104 — light blue
- 105 — light purple
- 106 — turquoise
All the colour options have defaults, most of which I left unchanged — I only altered the most commonly listed entities. The list of entities you can change is:
Best Terminal App For Macos
- di — directory
- fi — file
- ln — link
- pi — FIFO (ie. a named pipe)
- so — socket
- bd — buffered block
- cd — unbuffered character
- or — link pointing to a non-existent file, ie. an orphan
- mi — link pointing to a non-existent file when you use
ls -l
- ex — executable
To list the defaults, enter:
As you’ll notice if you run the above command, a final tweak you can perform is to colour files by their extension. For example, to colour
.md
files white, you’d add:How To Use Terminal On Mac
to your
LS_COLORS
. The scope for customisation is colossal, and the key here is to experiment and find the colours you prefer and which are clear against whatever window-background colour (and opacity) you’ve set Terminal to display.