1 - Conky
安装
新版本的conkey的安装和配置方式和之前的完全不一样了。
可以直接 apt-get 安装
sudo apt-get install conky-all
conky-manager 不再存在了。
安装完成之后执行 conky & 命令,就能看到 conky 的监控界面了。但,很丑很丑。
配置
暂时先不研究。
参考
参考这三个应该就可以的:
2 - Hardinfo
hardinfo 是一个硬件信息查看工具。
可以直接通过软件管理器安装,“开始菜单” -> “系统管理” -> “软件管理器”,搜索 hardinfo,然后直接安装。
之后在 “开始菜单” -> “系统管理” -> “System Profiler and Benchmark”,打开 hardinfo,就可以查看到系统信息和硬件设备信息:

3 - System Monitor
System Monitor 是 Linux Mint 自带的系统监控工具,在 “开始菜单” -> “系统管理” -> “System Monitor” 打开。
- Processes 看进程信息,相当于图形版本的 top
- Resources 看资源信息
- File Systems 看硬盘分区和分区使用情况
如图,Resources中可以看到cpu,内存(包括交换分区),网络的使用情况:

4 - 关闭屏幕
最近经常从 macbook 运行 vs code 来 remote ssh 到 linux mint 主机上进行开发,遇到一个小问题:就是 linux mint 的主机屏幕如果不关闭,我就无法在 Macbook 上直接使用显示器(我的3台4k显示器分别有两组线材连接到台式机和macbook),我必须一个一个显示器去调整输入信号为macbook,非常麻烦。
解决的方法有两种。
闲置超时自动关闭屏幕
在 linux mint 的系统设置(system settings)中中,Power Options 选项中设置 “Turn off the screen when inactive for” ,但很遗憾最小的时间为 5分钟。
这个方式可用,单等5分钟是不能忍的。这还不如直接关机再重启呢,20秒之内可以重新启动完成。
在下面还有一个 “when the power button is pressed”,在windows下可以选择关闭屏幕,但是 linux mint 里面没有关闭屏幕的选项,最多只能选 “Lock Screen”。
只能找其他的方法。
通过命令来关闭屏幕
google了一圈,发现这个命令可以用在 linux mint上:
cinnamon-screensaver-command -l; xset dpms force off;
如果遇到报错:
xset: unable to open display ""
则需要设置 DISPLAY 环境变量为 :0.0,为了避免造成其他影响就不直接修改 .zshrc 文件了,改在命令中增加 export 内容:
cinnamon-screensaver-command -l; export DISPLAY=:0.0;xset dpms force off;
实测可用。
添加alias命令
为了方便使用,在 .zshrc 中增加 alias:
alias turn-off-screens='cinnamon-screensaver-command -l;export DISPLAY=:0.0;xset dpms force off;'
需要关闭屏幕时只需要执行 turn-off-screens 就好了。
添加快捷键
增加一个命令,在 /usr/local/bin 创建 shortcut_turn_off_screen.sh文件,
sudo vi /usr/local/bin/shortcut_turn_off_screen.sh
内容为:
bash -c "cinnamon-screensaver-command -l;export DISPLAY=:0.0;xset dpms force off;"
记得设置可执行权限:
sudo chmod +x /usr/local/bin/shortcut_turn_off_screen.sh
然后在 linux mint 的 System Settings 中选择 Keyboard -> Shortcuts -> Custom Shortcuts,“add custom shortcut”。名称设置为"turn off screen",命令为:
/usr/local/bin/shortcut_turn_off_screen.sh
再分配一个快捷键,为了方便和醒目我就直接把锁屏键(也就是 super + L)用来关闭屏幕了。
直接就可以一键关闭屏幕!赞
参考资料
5 - 重置多屏设置
我用的是 Cinnamon 桌面,只要简单转移走 Cinnamon 的专属显示配置文件,就可以清除历史设置:
mv ~/.config/cinnamon-monitors.xml ~/.config/cinnamon-monitors.xml.bak
之后再外界显示器,就可以重新开始正常设置。
设置好之后,再次执行mv命令进行备份。