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
- xclip
Access X11 clipboards from the command-line - defaultbrowser
Command-line tool for getting & setting the default browser - shelltestrunner
Portable command-line tool for testing command-line programs - eatmemory
Simple program to allocate memory from the command-line - flac123
Command-line program for playing FLAC audio files - mailsend
A program to send mail via SMTP from command line. - jsonfmt
A command line program for pretty-printing or minimizing json files. - tree-sitter-config
User configuration of tree-sitter's command line programs
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents