简体   繁体   中英

Silence login info when not using a display manager

I want to silence the login info provided in tty after the boot-log/boot-screen and drop me directly to shell. What I get after the boot-screen is complete.

Run 'nixos-help' for the NixOS manual.
CosPi login: creator54 (automatic login) 

after this I get a shell prompt. I know I could just add a clear on topmost of my shell config, but it takes some time to reach the shell after the boot-log/boot-screen is complete and the OS gets stuck in this info for few(~15) seconds. So adding clear does't do much here as i'll still see the info.

If you can control what files the home of the user you are logging in contains, you can disable the messages by adding the file .hushlogin to the home directory. It does not have to contain anything, just do

touch .hushlogin

(I have not used this on NixOS, but this .hushlogin is a very old feature that works on other Linux distributions, and also on Solaris, FreeBSD etc).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM