Display Htop on TTY8
From WikiMLT
Here is shown how to display the output of any command like as ournalctl
, dmesg
, sar
, a directory watcher, tail ‑f
, or htop
(which is the current example) to tty8
, that can be activated by Crtl+Alt+F8 – using Systemd service.
To do that we need to create a service file – this is htop-tty8.service
in the following example. Then start the service and enable it to be auto started at the boot time.
sudo nano /etc/systemd/system/htop-tty8.service
[Unit]
Description=htop on tty8
[Service]
Type=simple
ExecStart=/usr/bin/htop
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty8
[Install]
WantedBy=multi-user.target
sudo systemctl start htop-tty8.service
sudo systemctl enable htop-tty8.service
The source of this post is an answer provided by Rinzwind at Ask Ubuntu: What is the purpose of ctrl+alt+f8?