How to modify and implement a better SSH login message

Table of contents

Introducing motd

It stands the "Message of the Day", and it shows after a successful login. Run man motd.tail to check more information about motd. To edit this message use a text editor:

vim /etc/motd

Customizing Bash Profile for enhanced welcome message

To make my command line experience more informative and visually appealing, I like to include details such as the current users logged in, system uptime, CPU usage, and disk statistics in my Bash profile. Here's how you can achieve that:

Open your Bash profile for editing:

vim ~/.bash_profile
w # Display uptime information and current users
echo "" # Create a space for better readability
df -h -x tmpfs -x udev # Display disk usage, excluding tmpfs and udev

Save and exit the file.

Now, when you log in via SSH, your welcome message will be more informative and visually appealing.

Related Content
Author
I’m a passionate full-stack software engineer, architect and Debian lover.