Clipboard Operations
Read clipboard
bash
termux-clipboard-get
Write to clipboard
bash
termux-clipboard-set "text to copy" # or pipe: echo "text" | termux-clipboard-set
Returns the clipboard contents as plain text.
读取或写入 Android 剪贴板。适用于文本复制与粘贴、应用间数据传输,或访问剪贴板内容。
--- frontmattername: termux-clipboard description: Read or write the Android clipboard. Use when copying/pasting text, transferring data between apps, or accessing clipboard contents.
termux-clipboard-get
termux-clipboard-set "text to copy" # or pipe: echo "text" | termux-clipboard-set
Returns the clipboard contents as plain text.