Pbcopy and Pbpaste

#alias

We can copy and paste using xsel --input --clipboard and xsel --output --clipboard, but it can be a lot quicker to just write an alias around it.

Install the xsel package

apt-get install -y xsel

Add an alias

vim ~/.zshrc
 
# add the following
alias pbcopy="xsel --input --clipboard"                                          
alias pbpaste="xsel --output --clipboard"

Reload the zshrc shell.

source ~/.zshrc

Verify that it works

 echo "hello world" | pbcopy
 pbpaste
hello world