macOS
brew install xcliplocal Homebrew formula metadata
sudo port install xclipMacPorts ports tree · x11/xclip/Portfile · 来源: api.github.com
安装
brew install xcliplocal Homebrew formula metadata
sudo port install xclipMacPorts ports tree · x11/xclip/Portfile · 来源: api.github.com
sudo apk add xclipAlpine Linux edge package indexes · xclip · 来源: dl-cdn.alpinelinux.org
sudo dnf install xclipFedora Rawhide package metadata · xclip · 来源: dl.fedoraproject.org
nix profile install nixpkgs#xclipnixpkgs package indexes · pkgs/by-name/xc/xclip/package.nix · 来源: api.github.com
sudo pacman -S xclipArch Linux sync databases · xclip · 来源: geo.mirror.pkgbuild.com
sudo zypper install xclipopenSUSE Tumbleweed package metadata · xclip · 来源: download.opensuse.org
概览
Access X11 clipboards from the command-line
历史
xclip is a long-running command-line interface to X11 selections. The README describes it as a utility for any system with an X11 implementation, able to read standard input or files into an X selection and print a selection back to standard output.
The source file records copyright by Kim Saunders in 2001 and Peter Astrand in 2007-2008, marking xclip as an older Unix desktop utility that predates modern clipboard abstractions. Its old changelog starts at version 0.01, "Everything. First release, pretty basic, but it worked," then shows a steady evolution through file input, output mode, selection choice, INCR support for large transfers, UTF-8 fixes, man pages, and helper scripts.
Version 0.05 added the ability to access XA_SECONDARY and XA_CLIPBOARD rather than only the default primary selection. Version 0.06 added support for the X INCR mechanism, improving large-data transfers. Version 0.10 moved the build from Imake to Autoconf and added `xclip-copyfile` and `xclip-pastefile`, making the tool useful not only for text snippets but also for copying files over an existing X11 connection.
The project was historically hosted on SourceForge and later moved to GitHub. SourceForge now says the project remains there for historical reasons and points users to the GitHub repository; the GitHub changelog includes a February 2016 commit changing SourceForge URLs to GitHub. The 0.13 GitHub release in September 2016 gathered several years of fixes and small features after the 0.12 line.
xclip became one of the standard small utilities installed when scripts, editors, or terminal workflows need access to the X11 clipboard. Debian describes it as a command-line interface to X selections, and distribution package pages across Debian, Fedora, Arch, Alpine, GNU Guix, OpenBSD ports, and Homebrew carry the same role: a tiny bridge between shell pipelines and desktop selection ownership.
Its adoption is also visible through how other software talks about clipboard support on Linux: command-line tools frequently recommend `xclip` or `xsel` for X11 clipboard integration. That position has persisted even as Wayland gained adoption, because X11 and XWayland sessions still expose the selection model that xclip was written to manipulate.
The classic usage is pipeline-oriented: `uptime | xclip` puts command output into the primary selection, `xclip -o -sel clip` writes the clipboard to standard output, and `xclip -o | xclip -sel clip` copies the primary selection into the explicit clipboard. The README also documents use from Vim filters and scripts that open selected URLs or save browser-copied text.
The helper commands `xclip-copyfile`, `xclip-pastefile`, and `xclip-cutfile` use the selection mechanism to move files or directory trees between directories and even between machines when X11 forwarding is available. This is the package-nerd trick that makes xclip more than a text clipboard tool: it can piggyback on an already-authenticated X connection as a lightweight file-transfer path.
xclip matters because the X Window System has multiple selections, not just a single clipboard. The README points to the freedesktop.org clipboard specification and summarizes the difference between XA_PRIMARY, middle-click paste, and XA_CLIPBOARD, giving shell users precise control over a desktop feature that GUI applications usually hide.
The tool's design also explains a recurring Unix packaging pattern: a small C program, a man page, and shell helpers become the glue that lets unrelated programs interoperate. For headless or remote workflows it is still bounded by the existence of an X display, but within that boundary it remains the boring, reliable answer for "put this command output where my GUI can paste it."
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
xclip | cli | 全局可执行文件 | |
xclip-copyfile | cli | 全局可执行文件 | |
xclip-cutfile | cli | 全局可执行文件 | |
xclip-pastefile | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/astrand/xclip
安装元数据
| 软件包键 | brew:xclip |
|---|---|
| 版本 | 0.13 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/xclip |
| 主页 | https://github.com/astrand/xclip |
| 仓库 | https://github.com/astrand/xclip |
| 上游文档 | https://github.com/astrand/xclip#readme |
| 许可证 | GPL-2.0-or-later |
| 源码归档 | https://github.com/astrand/xclip/archive/refs/tags/0.13.tar.gz |
| 依赖 | libx11, libxmu |
| 构建依赖 | autoconf, automake |
| Bottle | 可用 (于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | xclip |
| Version Scheme | 0 |
| Revision | 1 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
xclip 0.13-4
command line interface to X selections
https://github.com/astrand/xclip
sudo apt install xclipxclip
nix profile install nixpkgs#xclipxclip 0.13-3
command line interface to X selections
https://github.com/astrand/xclip
sudo apt install xclipxclip 0.13-r3
Command line interface to the X11 clipboard
https://github.com/astrand/xclip
sudo apk add xclipxclip-doc 0.13-r3
Command line interface to the X11 clipboard (documentation)
https://github.com/astrand/xclip
sudo apk add xclip-docxclip 0.13-26.git11cba61.fc44
Command line clipboard grabber
http://sourceforge.net/projects/xclip
sudo dnf install xclipxclip 0.13-6
Command line interface to the X11 clipboard
https://github.com/astrand/xclip
sudo pacman -S xclipxclip 0.13+git20220129-1.5
Command Line Interface to the X11 Clipboard
https://github.com/astrand/xclip
sudo zypper install xclipxclip
sudo port install xclip来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.