😯What is this?
When using Ubuntu, mouse selection isn't always available when you want to copy terminal output.
This is a note on how to copy it using a command instead.
🌵Environment
- Distributor ID: Ubuntu
- Description: Ubuntu 24.04 LTS
- Release: 24.04
- Codename: noble
🔧How to do it
Install the xsel command
sudo apt install xselAdd the following to the end of the command you want to run
| xsel --clipboard --input
and the output will be copied to the clipboard.
sudo ufw status | xsel --clipboard --input