AptLynx

Command-line tool

xsel

brew/xsel

Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev

Command-line program for getting and setting the contents of the X selection

At a glance

Type
Command-line tool
Install on
macOS, Linux
Last checked
25 Oct 2026, 21:09 UTC

Install it

macOS

brew install xsel

Linux

brew install xsel

Use a command's output as input of the clipboard (equivalent to `<Ctrl c>`)

echo 123 | xsel -ib

Use the contents of a file as input of the clipboard

cat path/to/file | xsel -ib

Output the clipboard's contents into the terminal (equivalent to `<Ctrl v>`)

xsel -ob

Related command-line tools

Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents