pbcopy is an awesome tool on Mac, but the actual program is not available on Ubuntu.
The functionality can be replicated in a few simple steps on Ubuntu, or any distro of linux with a few modifications.
sudo apt-get install -y xclip
Open .bashrc and add an alias
alias pbcopy="xclip -sel clip"
Close the editor and execute
pbcopy < ~/.ssh/id_rsa.pub for example will copy your public SSH key to the clipboard
ZSH users can follow the same steps, replacing
Take it one step further by adding an additional alias of
alias cpkey="pbcopy < ~/.ssh/id_rsa.pub" to copy your SSH key with just
cpkey in ther terminal.