# xsel を Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper でインストール

xsel のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:xsel
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install xsel
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install xsel
```

  証拠: MacPorts ports tree: x11/xsel/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add xsel
```

  証拠: Alpine Linux edge package indexes: xsel from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install xsel
```

  証拠: Debian stable package indexes: xsel from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install xsel
```

  証拠: Fedora Rawhide package metadata: xsel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#xsel
```

  証拠: nixpkgs package indexes: pkgs/by-name/xs/xsel/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S xsel
```

  証拠: Arch Linux sync databases: xsel from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install xsel
```

  証拠: openSUSE Tumbleweed package metadata: xsel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:xsel
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/xsel>
- **バージョン:** 1.2.1
- **ソース概要:** Command-line program for getting and setting the contents of the X selection
- **ホームページ:** <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
- **生成日時:** 2026-07-08T18:08:21+00:00

## 実行可能ファイル

- xsel (cli)
- xsel (エイリアス)

## 依存関係

- libx11

## ビルド依存関係

- autoconf
- automake
- libtool
- libxt
- pkgconf

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, monterey, sonoma, ventura, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-07-08
- マネージャ版: 1.2.1
- マネージャ更新日: 2026-05-25
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/kfish/xsel
- 検出された最新: 1.2.1 (最新)
## プロジェクトの歴史と使われ方

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.

### タイムライン

- 2001-07: The xsel manpage dates Conrad Parker's authorship to July 2001.
- 2001: The license file records Conrad Parker copyright for xsel.
- 2008-01: The distributed manpage is dated January 2008.
- 2009: The homepage lists version 1.2.0 as the latest available tarball.
- 2020s: xsel remains packaged across Linux, BSD, macOS package-manager, and X11 compatibility environments.

### Related projects

- xclip is the closest alternative command-line X clipboard/selection utility.
- xclipboard is the classic X clipboard manager referenced by the xsel manpage.
- ICCCM defines the X selection conventions xsel follows.
- Wayland-native clipboard tools such as wl-clipboard fill the equivalent niche outside X11.

### ソース

- <https://github.com/kfish/xsel>
- <https://linux.die.net/man/1/xsel>
- <https://raw.githubusercontent.com/kfish/xsel/master/COPYING>
- <https://raw.githubusercontent.com/kfish/xsel/master/xsel.1x>
- <https://www.vergenet.net/~conrad/software/xsel/>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## ソースデータベース詳細

- **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:** head, stable

## 他のパッケージマネージャ記録

- Debian apt - xsel - 1.2.1-1: normalized package name match | Debian stable package indexes: xsel from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line tool to access X clipboard and selection buffers | http://www.vergenet.net/~conrad/software/xsel/
- Nix - xsel: normalized package name match | nixpkgs package indexes: pkgs/by-name/xs/xsel/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - xsel - 1.2.1-1: normalized package name match | Ubuntu 24.04 LTS package indexes: xsel from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line tool to access X clipboard and selection buffers | http://www.vergenet.net/~conrad/software/xsel/
- apk - xsel - 1.2.1-r0: normalized package name match | Alpine Linux edge package indexes: xsel from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line program for manipulating the X selection | http://www.vergenet.net/~conrad/software/xsel
- apk - xsel-doc - 1.2.1-r0: normalized package name match | Alpine Linux edge package indexes: xsel-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command-line program for manipulating the X selection (documentation) | http://www.vergenet.net/~conrad/software/xsel
- dnf - xsel - 1.2.1-10.fc44: normalized package name match | Fedora Rawhide package metadata: xsel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Command line clipboard and X selection tool | https://www.vergenet.net/~conrad/software/xsel/
- pacman - xsel - 1.2.1-2: normalized package name match | Arch Linux sync databases: xsel from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command-line program for getting and setting the contents of the X selection | https://vergenet.net/~conrad/software/xsel/
- zypper - xsel - 1.2.1-1.6: normalized package name match | openSUSE Tumbleweed package metadata: xsel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Command-line Program for Getting and Setting the Contents of the X Selection | http://www.kfish.org/software/xsel/
- MacPorts - xsel: normalized package name match | MacPorts ports tree: x11/xsel/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 関連リンク

- [Terminal utility packages](https://www.automicvault.com/ja/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/ja/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/ja/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [autoconf](https://www.automicvault.com/ja/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/ja/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/ja/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [yank](https://www.automicvault.com/ja/pkg/brew/yank/) - Shares av.db curated category or tags: cli, clipboard, selection, system, terminal.
- [xclip](https://www.automicvault.com/ja/pkg/brew/xclip/) - Shares av.db curated category or tags: cli, clipboard, system, x11.
- [libxcvt](https://www.automicvault.com/ja/pkg/brew/libxcvt/) - Shares av.db curated category or tags: cli, system, x11.
- [libxpm](https://www.automicvault.com/ja/pkg/brew/libxpm/) - Shares av.db curated category or tags: cli, system, x11.
- [mkfontscale](https://www.automicvault.com/ja/pkg/brew/mkfontscale/) - Shares av.db curated category or tags: cli, system, x11.
- [xauth](https://www.automicvault.com/ja/pkg/brew/xauth/) - Shares av.db curated category or tags: cli, system, x11.
- [xcursorgen](https://www.automicvault.com/ja/pkg/brew/xcursorgen/) - Shares av.db curated category or tags: cli, system, x11.
- [xdpyinfo](https://www.automicvault.com/ja/pkg/brew/xdpyinfo/) - Shares av.db curated category or tags: cli, system, x11.
- [xdotool](https://www.automicvault.com/ja/pkg/brew/xdotool/) - Local package facts share a topical domain. Shared terms: cli, libx11, system, x11.

## Combined YAML source

View the package source record on GitHub. [combined/xsel.yml](https://github.com/automic-vault/db/blob/main/combined/xsel.yml)


## ソース

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
