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.

Tutorial Feedback...
Was this article helpful? If you don't find this article helpful or found some outdated info, issue or a typo, do post your valuable feedback or suggestions in the comments to help improve this article...

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.

2 thoughts on “jm-shell – A Highly Informative and Customized Bash Shell”

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.