2

I've got a cool custom MOTD that shows up after the login. But before my MOTD a line of text with the kernel version and wrong date shows up:

login as: pi
pi@pi's password:
Linux raspberrypi 3.6.11-rpi-aufs #1 PREEMPT Sat Sep 7 23:10:27 CEST 2013 armv6l

I want to get rid of this line:

Linux raspberrypi 3.6.11-rpi-aufs #1 PREEMPT Sat Sep 7 23:10:27 CEST 2013 armv6l

I've already tried looking at issue, motd, .profile, etc... But I couldn't find that text anywhere.

1
  • that is the output of uname -a I am not near a Pi at the moment but my guess is the .bashrc or .profile is executing it.
    – rob
    Mar 26, 2014 at 15:34

3 Answers 3

3

Answer no longer works on Jessie for a (virtual or serial) terminal. It's OK for SSH. This post explains what's the problem: https://lists.debian.org/debian-devel/2014/12/msg00368.html edit /etc/pam.d/login to remove uname -snrvm then the login message is gone.

3

Found it in the /etc/init.d/motd file. A shell script that, quote:

Short-Description: Create dynamic part of /etc/motd

You can remove the uname line or the whole file.

2
  • Do you also need to delete /run/motd.dynamic which is created by the motd init script? Or does /run get initalized on each boot? Mar 26, 2014 at 17:11
  • 5
    The proper way would be to use sudo update-rc.d motd remove to pull the script out of the init script pool. manpage
    – WineSoaked
    Mar 26, 2014 at 17:15
0

1) Execute Command: "sudo nano /etc/update-motd.d/10-uname" from the CLI

2) Then hash out (Put a hash before) "uname -snrvm"

3) Save (ctrl x) & exit file)

Job Done!

1
  • FYI, Save in nano is done with Ctrl-O. Ctrl-X is for Exit, which prompts to save changes if any. Aug 6, 2019 at 5: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.