Skip to content

Save image in clipboard to file on Linux

Updated: at 03:40 AM

Table of contents

Open Table of contents

XClip

xclip is a great software in linux which allows saving images from clipboard to file. You can simply run xclip -selection clipboard -t image/png -o > install-xclip.png on command line for it to work. Xclip is a command-line utility that is used for handling clipboard content on X11 systems, which are commonly found in Unix-like operating systems. The primary purpose of xclip is to provide a way to interact with the clipboard using the command line, enabling users to copy and paste text between the terminal and other graphical applications.

sudo apt install xclip
xclip -selection clipboard -t image/png -o > install-xclip.png