macOS
brew install xsellocal Homebrew formula metadata
安装
brew install xsellocal Homebrew formula metadata
sudo apk add xselAlpine Linux edge package indexes · xsel · 来源: dl-cdn.alpinelinux.org
sudo dnf install xselFedora Rawhide package metadata · xsel · 来源: dl.fedoraproject.org
nix profile install nixpkgs#xselnixpkgs package indexes · pkgs/by-name/xs/xsel/package.nix · 来源: api.github.com
sudo pacman -S xselArch Linux sync databases · xsel · 来源: geo.mirror.pkgbuild.com
sudo zypper install xselopenSUSE Tumbleweed package metadata · xsel · 来源: download.opensuse.org
概览
Command-line program for getting and setting the contents of the X selection
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
xsel | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:xsel |
|---|---|
| 版本 | 1.2.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/xsel |
| 主页 | https://www.vergenet.net/~conrad/software/xsel/ |
| 仓库 | https://github.com/kfish/xsel |
| 上游文档 | https://www.vergenet.net/~conrad/software/xsel |
| 许可证 | HPND-sell-variant |
| 源码归档 | https://github.com/kfish/xsel/archive/refs/tags/1.2.1.tar.gz |
| 最后更新 | 2026-05-25T14:39:17-04:00 |
| Pulse | updated |
| 依赖 | libx11 |
| 构建依赖 | autoconf, automake, libtool, libxt, pkgconf |
| Bottle | 可用 (于 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 | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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 xsel来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.