Skip to content

Welcome Banner #2458

Closed Answered by MickLesk
Sleepy46 asked this question in Q&A
Feb 17, 2025 · 4 comments · 8 replies
Discussion options

You must be logged in to vote

If anyone add the Welcome-Banner to old installations or anything else:

1.) Create an new File:

nano set_motd.sh

2.) add following lines:

#!/bin/bash

# Function to set MOTD
set_motd() {
  # Define colors and icons
  YW=$(echo "\033[33m")
  GN=$(echo "\033[1;92m")
  CL=$(echo "\033[m")
  TAB="  "

  GATEWAY="${TAB}🌐${TAB}${CL}"
  OS="${TAB}🖥️${TAB}${CL}"
  HOSTNAME="${TAB}🏠${TAB}${CL}"
  INFO="${TAB}💡${TAB}${CL}"

  # Get OS information
  if [ -f "/etc/os-release" ]; then
    OS_NAME=$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '"')
    OS_VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"')
  elif [ -f "/etc/debian_version" ]; then
    OS_NAME="Debian"
    OS_VERSION=

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
6 replies
@tremor021
Comment options

@Sleepy46
Comment options

@tremor021
Comment options

@Sleepy46
Comment options

@tremor021
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Sleepy46
Comment options

You must be logged in to vote
2 replies
@MickLesk
Comment options

@tremor021
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants