---
name: "vis-clipboard"
section: "1"
platform: "linux"
package: "vis"
version: "0.9.r501.g254329d9-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/vis-clipboard"
---

# vis-clipboard(1)

Read from or write to the system clipboard

## NAME

**vis-clipboard** – Read from or write to the system clipboard

## SYNOPSIS

**vis-clipboard** **--usable**

**vis-clipboard** **--copy** \[**--selection** *selection*\]

**vis-clipboard** **--paste** \[**--selection** *selection*\]

## DESCRIPTION

**vis-clipboard** wraps various system-specific tools for interacting with a system clipboard. It can run in three different ways, depending on the flag given on the command-line.

- **--usable**

  In this mode, **vis-clipboard** looks for a way to interface with the system clipboard. If it finds one, it terminates with exit code 0. If no interface to the system clipboard is available, it terminates with exit code 1.

- **--copy**

  In this mode, **vis-clipboard** reads the content of standard input, and stores it in the system clipboard.

- **--paste**

  In this mode, **vis-clipboard** reads the content of the system clipboard, and writes it to standard output.

- **--selection** *selection*

  specify which selection to use, options are "primary" or "clipboard". Silently ignored on platforms with a single clipboard.

## CLIPBOARD TOOLS

To determine which system clipboard to use, **vis-clipboard** checks for these clipboard tools in the following order:

- [wl-clipboard(1)](/wl-clipboard/1.md)

  Wayland (if $WAYLAND\_DISPLAY is set)

- *wayclip*

  Wayland (if $WAYLAND\_DISPLAY is set)

- [xclip(1)](/xclip/1.md)

  X11 (if $DISPLAY is set)

- [xsel(1)](/xsel/1.md)

  X11 (if $DISPLAY is set)

- pbcopy(1) / pbpaste(1)

  macOS

- wslclip(1)

  WSL (Windows Subsystem for Linux)

- */dev/clipboard*

  Cygwin

- *termux-clipboard-{get,set}*

  Termux

## EXIT STATUS

The **vis-clipboard** utility exits 0 on success, and \>0 if an error occurs. When run with the **--usable** flag, an exit status of 0 means that it found a supported system-specific tool, while 1 means that clipboard access is not available.

## EXAMPLES

Test whether clipboard access is available:

```
if vis-clipboard --usable; then
	echo "Clipboard access available"
else
	echo "No clipboard"
fi
```

Copy a friendly greeting to the clipboard:

```
echo "Hello, World" | vis-clipboard --copy
```

Send the current contents of the system clipboard to be recorded and analyzed:

```
vis-clipboard --paste | curl -d - https://www.nsa.gov/
```

## SEE ALSO

pbcopy(1), pbpaste(1), [vis(1)](/vis/1.md), waycopy(1), waypaste(1), [wl-clipboard(1)](/wl-clipboard/1.md), wslclip(1), [xclip(1)](/xclip/1.md), [xsel(1)](/xsel/1.md)
