LoginSignup
28
19

More than 5 years have passed since last update.

[Linux] コマンドラインでの標準出力をクリップボードにコピーする

Posted at

MacというかUnix系だと pbcopy を使うようですが、Linuxでは xsel を使えば良いようです。

xsel

xselのインストール(Ubuntu)
$ sudo apt-get install xsel
使用例
$ echo "aaa" | xsel --clipboard --input
or
$ echo "bbb" | xsel -bi

参考

標準出力をクリップボードにコピーする pbcopy , macosx,ubuntu,cygwin でそれぞれ使う - my-notebook
linux - Pipe to/from the clipboard - Stack Overflow

28
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
19