ubuntu下的用户可以只用apt-get来安装:sudo apt-get install xclipecho "Hello, world" | xclipmac下使用pbcopy命令: cat myFile.txt | pbcopy转自: http://justcoding.iteye.com/blog/1829963