Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 命令列截圖神器 scrot 完整用法大全

編輯:關於 Linux

scrot (SCReenshOT) 是輕量級命令列截圖工具,支援全螢幕、視窗選取、矩形區域、延遲、品質/縮放調整、後處理管線,適合無桌面環境或腳本自動化截圖需求。

安裝 scrot

# Debian/Ubuntu/Mint
sudo apt-get install scrot

# Fedora
sudo dnf install scrot

# CentOS (需 EPEL 或源碼編譯)
sudo yum install epel-release && sudo yum install scrot
# 或源碼編譯:
yum install giblib-devel
wget https://linuxbrit.co.uk/downloads/scrot-0.8.tar.gz
tar xvfz scrot-0.8.tar.gz && cd scrot-0.8
./configure && make && sudo make install

核心用法速查

需求指令說明
全螢幕截圖scrot儲存為 日期_尺寸.png 於當前目錄
指定檔名/路徑scrot ~/Pictures/desktop.png自訂輸出位置
選取視窗/矩形區域scrot -s滑鼠點選視窗或拖曳框選
延遲 N 秒截圖scrot -d 5整理視窗/觸發選單用
延遲 + 區域選取scrot -s -d 5結合上述兩功能
調整 JPEG 品質 (1-100)scrot -q 50預設 75,數值越大品質越好
縮放輸出尺寸 (1-100%)scrot -t 10縮小至原圖 10%,適合縮圖
截圖後自動移動scrot -e 'mv $f ~/shots/'$f 為檔名變數,支援任意後處理

scrot 截圖範例

提示: scrot -s 需 X11 擴展支援,Wayland 下可能無法互動選取;可改用 grim + slurp (Wayland 原生工具鏈)。
Copyright © Windows教程網 All Rights Reserved