020 3034 0116

24/7 Remote Support

Mon - Fri: 9:00 - 18:00

Office hours

FreeBSD – running HTOP instead of login screen on TTY0 console

Author: Yaroslav Koisa

Created on 6 January 2021

Last edit commited on 5 July 2023

Table of Contents

1. Install htop and tmux or build them from ports

pkg install htop
## I will be using nano as my editor of choise and bash as my shell of choise. Let's install them:
pkg install nano bash

2. Edit /etc/gettytab

Edit /etc/gettytab and add few additional lines to end of that file:
nano /etc/gettytab
HTOP|htop|HTOP running inside of TMUX:\
:ht:np:sp#15200:lo=/root/start-htop.sh:al=root:

3. Create start-htop.sh and run chmod +x to allow execution

Create our start-htop.sh and add the required commands to it:
nano /root/start-htop.sh
#!/usr/local/bin/bash
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
tmux new-session htop
Add execute permissions:
chmod +x /root/start-htop.sh

4. Edit /etc/ttys to reconfigure TTY0

Edit the file /etc/ttys:
nano /etc/ttys

And replace the line that starts with ttyv0 (it was at line 32 in my config) with the next line:
ttyv0   "/usr/libexec/getty htop"            xterm   on secure

5. Reboot or run kill -1 1 to reflect the latest changes

At this point everything is ready and you have 2 options – reboot the system or hup the init system in order to show the latest changes on the screen at TTY level.
a) Reboot:
reboot
OR
b) Send HUP to init system:
kill -1 1

Consider donating towards our project, to support a future content release

Our website uses cookies to ensure you get the best experience.

Would like to find out more about our MSP services?
We are here to help.

Please fill in the form below and our company representative will be with you shortly.

Would like to find out more about our Remote IT support services?
We are here to help.

Please fill in the form below and our company representative will be with you shortly.

Would like to find out more about our on-site IT support services?
We are here to help.

Please fill in the form below and our company representative will be with you shortly.

Need urgent on-site support visit?
We are here to help.

Need urgent remote technical support?
We are here to help.

Call me back please!