jm-shell – A Highly Informative and Customized Bash Shell

jm-shell is a free open source, small, highly informative and customized Bash shell, that gives you a great wealth of information about your shell activity as well as certain useful system information such as system load average, battery status of laptops/computers and much more.

Importantly, unlike Bash which only stores unique commands in a history file, for searching previously run commands – jm-shell records each and every shell activity in a log file.

Read Also: The Power of Linux “History Command” in Bash Shell

In addition, if your current directory is a code repository for any version control systems such as Git, Subversion, or Mercurial, it will provide information about your repositories (such as active branch).

jm-shell Preview

jm-shell Preview

Jm-shell Features

  • Has a status line (divider) to separate commands.
  • Displays the number of items in current directory.
  • Shows current location in the filesystem.
  • It maintains a shell log file – full history of your shell activity.
  • Displays current system load average if higher than, in red if critical (higher than 2).
  • Shows the time last command finished.
  • It prints an error code of last command, if any.
  • Displays total time of last command if higher than 4 seconds.
  • Has a prompt in the form; [email protected]:path.
  • Supports multiple prompt styles.
  • Supports background jobs.
  • It also displays laptop battery charge status, in case it’s not full and many other features.

How to Install jm-shell in Linux Systems

To install most recent version of jm-shell, you need to clone git repository of jm-shell sources to your system and move into the local repository using following commands.

$ git clone https://github.com/jmcclare/jm-shell.git
$ cd jm-shell

Next, configure Bash to use jm-shell by creating or copying a symlink from ps1, colors.sh, and color_unset.sh to the directory ~/.local/lib/bash (you need to create this directory if it doesn’t exist) as shown.

$ mkdir ~/.local/lib/bash	#create the directory if it doesn’t exist 
$ cp -v colors.sh colors_unset.sh ps1 -t ~/.local/lib/bash/
Configure Bash to Use jm-shell

Configure Bash to Use jm-shell

Then source the ps1 file by adding the following line in your ~/.bashrc shell initialization file.

source ~/.local/lib/bash/ps1

Then use the prompt_style variable in your ~/.bashrc to set your prompt styles (available styles include standard, tweaked, extensive, minimal or kirby) as shown.

prompt_style=extensive
Source PS1 and Set Prompt Style

Source PS1 and Set Prompt Style

Save and close ~/bashrc file, then source it to see the changes.

$ source ~/.bashrc
jm-shell for Linux

jm-shell for Linux

To change the shell log file location (default is ~/.local/share/bash/shell.log), use the BASHSHELLLOGFILE variable in ~/.bashrc file.

BASHSHELLLOGFILE=~/.bash-shell.log

For more information, go to the jm-shell Github Repository: https://github.com/jmcclare/jm-shell

jm-shell is a highly informative tool that includes set of scripts for customizing your Bash shell, with numerous practical and informative features for daily usage. Try it out and give us your feedback via the comment section below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

2 Responses

  1. Kalyan says:

    Keep on posting Linux experts..

    Thanks for the all wonderful articles..

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.