Copy working directory to clipboard from command line in Ubuntu
Install xclip utility sudo apt-get install xclip
When you're in the desired directory
pwd | xclip -selection -clipboard
This will copy the current directory to clipboard.
For convenience you can also create an alias of the command in your .bashrc file
alias cpwd="pwd | xclip -selection clipboard"
Which makes copying the current directory as simple as cpwd
Written by Ayman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#