On Linux alpine is it possible to clear the screen before the login prompt is shown.

I cant run commands from inside /etc/issue, so i am stuck in how to do it


You can add the clear command to "local" service, as follow:

# echo -e "#!/bin/sh\nclear" > /etc/local.d/clearscreen.start
# chmod +x /etc/local.d/clearscreen.start
# rc-update add local

The last command is needed to have the "local" service start on boot, since by default is disabled.

More info about local.d (and reccomendation): https://wiki.gentoo.org/wiki//etc/local.d

.: Francesco

  • Hay sadaly no luck the screen dont clear :( before the info in /etc/issues is read) – nig007 Aug 17 '17 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.