Skip to content

tinycloud-labs/bashlogin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Login

A lightweight login banner for Bash that displays system information. It can be integrated with .bashrc to display helpful messages in an elegant way for the services you want. Useful on remote servers.

screenshot1

screenshot2

Default display at login:

  • system information
  • user sessions

Optional items

  • show systemd service status (by supplying service names as args)
  • customizable banner style

Requires Figlet. Usually installed by default on major Linux distros and MacOS.

Note

Figlet only detects fonts installed locally, typically located in: /usr/share/figlet/. Install additional fonts via your package manager or manually add .flf files to that directory.

Usage

Clone the repository:

git clone https://github.com/tinycloud-labs/bashlogin.git ~/.config/bashlogin

Add this line to your ~/.bashrc:

source "$HOME/.config/bashlogin/main.sh"

Reload your shell:

source ~/.bashrc

Optional configuration

You can change the Figlet style and provide systemd service unit names to print.

In ~/.bashrc, export BASHLOGIN_ARGS:

  • Supply the service names (must be in systemd units)
  • Optionally, use the --style <FigletStyleName> to change the Figlet style

Tip

The --style <arg> is not a positional arg, it can be placed anywhere in the line

Example:

BASHLOGIN_ARGS="--style big ssh docker k3s-agent"

About

An elegant bash profile login banner

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages