I access my Pi remotely using SSH. While trying out the zsh shell as an alternative to bash, I wondered if I could get rid of all the bumf that’s displayed as soon as I’ve logged in. I want to see the command line prompt and not much else. A little research led me to the following.

.zshrc
fileThe text you see when you log into a Raspberry Pi remotely is generated by from a combination of static files and scripts.
The first line provides Linux information; it’s the output of the uname command, which in this case is called by the script /etc/update-motd.d/10-uname
.
The Debian copyright and warranty text is static. You’ll find it in the file /etc/motd
.
Edit each of these files, using sudo, and save them when you’re done. For the script, just comment out the line uname -snrvm
— just prefix the line with #
. For the static file, just delete the contents, or replace it with a message of your own.
Finally, the Last Login:...
line. I decided to keep this, but you can get rid of it by creating the file .hushlogin
in your home directory: cd $HOME && touch .hushlogin
.
Now log out (exit
) and when you log back in, you’ll just go straight to the prompt.
Note This all works in Raspbian Buster; older Pi operating systems might do it differently.