Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用 shell 命令锁定我的桌面。我怎样才能做到这一点?
你用的是什么桌面环境?
使用GNOME:
GNOME
gnome-screensaver-command -l
使用KDE:
KDE
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock
使用xfce:
xfce
xflock4
如果您有 xscreensaver 安装程序,这将起作用:
xscreensaver -lock
除此之外,这取决于您拥有的DE。