Display Htop on TTY8: Difference between revisions
From WikiMLT
mNo edit summary |
m Text replacement - "mlw-continue" to "code-continue" |
||
Line 7: | Line 7: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash" line="1" class=" | <syntaxhighlight lang="bash" line="1" class="code-continue"> | ||
[Unit] | [Unit] | ||
Description=htop on tty8 | Description=htop on tty8 |
Latest revision as of 07:30, 26 September 2022
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?