December 9, 2022

Copy the content of a file to the clipboard from the command line with xclip

Run:

$ xclip -sel clip file.txt

Some people create an alias for xclip -sel clip.

If you need to install xclip run:

$ sudo apt install xclip

xclip is copyleft-licensed and is maintained by Peter Åstrand.

To learn more about xclip you can run $ man xclip in the shell.


personal computing gnu linux command-line interface (cli) trisquel xclip wiki office applications shell literacy

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2024 by yctct is licensed under CC BY-ND 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88