# iTerm2

## Shell Integrations

{% embed url="<https://www.iterm2.com/documentation-shell-integration.html>" %}

### iTerm2 Terminal utilities

{% embed url="<https://www.iterm2.com/documentation-utilities.html>" %}

### Location

The Utilities Package places shell scripts in `$HOME/.iterm2/` and creates aliases to them at the bottom of `$HOME/.iterm2_shell_integration.$SHELL`.

**imgcat**

The **imgcat** program displays images inline in your terminal.`imgcat filename [filename...]`

#### imgls

Lists the files in a directory with thumbnail previews for images. `imgls [filename...]`

#### it2copy

Copies text to the pasteboard. Works over ssh. Accepts either standard input or a named file\
`cat file.txt | it2copy` \
`it2copy file.txt`\
For this to work you must enable Prefs > General > Applications in terminal may access clipboard.&#x20;

#### it2dl

The it2dl program downloads files. This is useful when you are ssh'ed to a remote host. The downloaded files are placed in your Downloads folder.&#x20;

#### it2getvar

Fetches a session variable. For information about variables, see Scripting Fundamentals.\
`it2getvar session.name`

#### it2setcolor

Configures iTerm2's colors.

**it2setkeylabel**

Configures touch bar function key labels.

**it2ul**

Uploads a file. Works over ssh.\
`it2ul [destination [tar flags]]`\
If used without arguments, the file goes to the current directory. When you run this, you'll be prompted to select one or more files. Next, iTerm2 creates a tar.gz file containing those files and base-64 encodes them. The it2ul script receives it, decodes it, and untars it with -xzfC. Any arguments you provide go after a lone - argument,

**it2universion**

Sets the unicode version for the current session.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://strangebutohwell.gitbook.io/knowledge/shells/terminal-programs/iterm2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
