Forrest logo
tool overview
On this page you find all important commands for the CLI tool xclip. If the command you are looking for is missing please ask our AI.

xclip

Xclip is a command line tool that allows you to interact with the clipboard in Linux environments. It provides a way to manipulate and transfer text from the command line to the clipboard and vice versa. With xclip, you can copy the contents of a file or command output directly to the clipboard using simple commands. Similarly, you can paste the clipboard contents into a file or process it further in your command line workflow. It supports both primary and secondary selections in X11 and can be used in scripts or pipelines for automation. Xclip is handy for quick and efficient copying and pasting of text without the need for a graphical interface. It is available in most Linux distributions and can be easily installed using package managers like apt or yum.

List of commands for xclip:

  • xclip:tldr:079f4 xclip: Paste the contents of the X11 primary selection area to the console.
    $ xclip -o
    try on your machine
    explain this command
  • xclip:tldr:50a12 xclip: Copy the contents of a file into the system clipboard.
    $ xclip -sel clip ${input_file-txt}
    try on your machine
    explain this command
  • xclip:tldr:524cd xclip: Paste the contents of the system clipboard to the console.
    $ xclip -o -sel clip
    try on your machine
    explain this command
  • xclip:tldr:b085c xclip: Copy the contents of a PNG into the system clipboard (can be pasted in other programs correctly).
    $ xclip -sel clip -t image/png ${input_file-png}
    try on your machine
    explain this command
  • xclip:tldr:b8201 xclip: Copy the user input in the console into the system clipboard.
    $ xclip -i
    try on your machine
    explain this command
tool overview