I'm trying to display on a motd user's detail (the user and the actual date)

Here is the step i take so far:

sudo nano /etc/update-motd.d/00-welcome #(script)

echo "Welcome user: ${USER}. Today is $(date)"  #(save the file)

sudo chmod +x /etc/update-motd.d/00-welcome

But after a successful login the motd do not appear. What should i try instead?


Did you read ALL of man update-motd? Near the end, it says:

   Scripts should emit a blank line before output, and end with a  newline
   character.  For instance:

So, change your script to:

echo "Welcome user: ${USER}. Today is $(date)"

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.