Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NotAShelf/07a455e676f0e4af802a83cfc4ef98b9 to your computer and use it in GitHub Desktop.
Save NotAShelf/07a455e676f0e4af802a83cfc4ef98b9 to your computer and use it in GitHub Desktop.
Get pbcopy and pbpaste in Arch Linux

Get pbcopy and pbpaste in Arch Linux

First you need the 'xsel' package.

pacman -S xsel

Then create aliases.

alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'

(Optional)

If you would like to make your aliases permanent, you need to add them to ~/.bashrc

For Bash:

nano ~/.bashrc

and paste

alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'

For ZSH:

nano .zshrc

and paste

alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
@bezlant
Copy link

bezlant commented Jul 5, 2022

Thank you, this was helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment