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; username@hostname: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.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

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.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

2 Comments

Leave a Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.