Command-line tool
xclip
brew/xclip
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Access X11 clipboards from the command-line
At a glance
- Type
- Command-line tool
- Install on
- macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
macOS
brew install xclip
Linux
brew install xclip
Copy the output from a command to the X11 primary selection area (clipboard)
echo 123 | xclip
Copy the output from a command to a given X11 selection area
echo 123 | xclip -se primary
Copy the output from a command to the system clipboard, using short notation
echo 123 | xclip -se c
Related command-line tools
- clip
Create high-quality charts from the command-line - xsel
Command-line program for getting and setting the contents of the X selection - outwit
Command-line tools for accessing the Windows clipboard, registry, databases, document properties, and links. - resty
Command-line REST client that can be used in pipelines clipboard file share 共享 分享 文件 china prc network 网络 发送… - yank
Copy terminal output to clipboard clipboard cross-platform sync encryption file-transfer lan - pass
Password manager - clipboard
Cut, copy, and paste anything, anywhere, all from the terminal clipboard - clipboard-history-x11
X11 Ringboard clipboard listener.
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents