macOS
brew install xsellocal Homebrew formula metadata
sudo port install xselMacPorts ports tree · x11/xsel/Portfile · source: api.github.com
brew
Command-line program for getting and setting the contents of the X selection. Version 1.2.1 via Homebrew; verified 2026-05-25.
install
brew install xsellocal Homebrew formula metadata
sudo port install xselMacPorts ports tree · x11/xsel/Portfile · source: api.github.com
sudo apk add xselAlpine Linux edge package indexes · xsel · source: dl-cdn.alpinelinux.org
sudo apt install xselDebian stable package indexes · xsel · source: deb.debian.org
sudo dnf install xselFedora Rawhide package metadata · xsel · source: dl.fedoraproject.org
nix profile install nixpkgs#xselnixpkgs package indexes · pkgs/by-name/xs/xsel/package.nix · source: api.github.com
sudo pacman -S xselArch Linux sync databases · xsel · source: geo.mirror.pkgbuild.com
sudo zypper install xselopenSUSE Tumbleweed package metadata · xsel · source: download.opensuse.org
overview
Command-line program for getting and setting the contents of the X selection
history
xsel is Conrad Parker's command-line utility for reading and setting X selections. It turns PRIMARY, SECONDARY, and CLIPBOARD selection ownership into a pipe-friendly Unix interface, making X11 copy/paste state usable from shell scripts and terminal workflows.
The xsel manpage identifies Conrad Parker as author and dates the program to July 2001, while the license file carries a 2001 copyright. Its homepage presents the core problem plainly: the X selection is normally accessible by manually highlighting text and pasting with the middle mouse button, while xsel lets files, pipes, and scripts participate.
The project developed around X11's ICCCM selection model. The manpage notes that there is no X selection buffer: xsel must own the selection and serve it on demand, often by forking a background process in input, keep, and exchange modes.
xsel became a standard small X11 utility because it solved a daily terminal-desktop gap. The homepage says it is available in most distributions, and package metadata shows it in Homebrew, Alpine, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE ecosystems.
Its closest cultural sibling is `xclip`; both became staples in scripts that move text between command output, terminal multiplexers, editors, browsers, and the X clipboard. xsel's options for append, follow, keep, exchange, and secondary selection make it especially explicit about the underlying X selection machinery.
Common usage is `command | xsel -b` to put text on the CLIPBOARD selection, `xsel -b -o` to print clipboard contents, `xsel < file` to own the PRIMARY selection with file contents, and `xsel > file` to save the current selection exactly.
The manpage documents PRIMARY as the default, with `--secondary` and `--clipboard` selecting the other X selections. Because X selection contents are served by the owner, xsel may detach in modes where it must keep supplying data after the shell command exits.
xsel is tiny, but it teaches a core X11 lesson: clipboard-like behavior is inter-client communication, not simply a global text buffer. Packaging it gives shell users a reliable bridge into that model.
It is also one of those utilities whose value increases in combinations: SSH sessions with X forwarding, terminal multiplexers, editors, scripts, password managers, build logs, and bug-report commands all benefit from being able to pipe text into or out of the X selection.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
xsel | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:xsel |
|---|---|
| Version | 1.2.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/xsel |
| Homepage | https://www.vergenet.net/~conrad/software/xsel/ |
| Repository | https://github.com/kfish/xsel |
| Upstream docs | https://www.vergenet.net/~conrad/software/xsel |
| License | HPND-sell-variant |
| Source archive | https://github.com/kfish/xsel/archive/refs/tags/1.2.1.tar.gz |
| Last updated | 2026-05-25T14:39:17-04:00 |
| Pulse | updated |
| Dependencies | libx11 |
| Build dependencies | autoconf, automake, libtool, libxt, pkgconf |
| Bottle | available (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | xsel |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
xsel 1.2.1-1
command-line tool to access X clipboard and selection buffers
http://www.vergenet.net/~conrad/software/xsel/
sudo apt install xselxsel
nix profile install nixpkgs#xselxsel 1.2.1-1
command-line tool to access X clipboard and selection buffers
http://www.vergenet.net/~conrad/software/xsel/
sudo apt install xselxsel 1.2.1-r0
Command-line program for manipulating the X selection
http://www.vergenet.net/~conrad/software/xsel
sudo apk add xselxsel-doc 1.2.1-r0
Command-line program for manipulating the X selection (documentation)
http://www.vergenet.net/~conrad/software/xsel
sudo apk add xsel-docxsel 1.2.1-10.fc44
Command line clipboard and X selection tool
https://www.vergenet.net/~conrad/software/xsel/
sudo dnf install xselxsel 1.2.1-2
Command-line program for getting and setting the contents of the X selection
https://vergenet.net/~conrad/software/xsel/
sudo pacman -S xselxsel 1.2.1-1.6
Command-line Program for Getting and Setting the Contents of the X Selection
http://www.kfish.org/software/xsel/
sudo zypper install xselxsel
sudo port install xselsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.