Link Search Menu Expand Document

Bonus guide: Pimp the command line

Difficulty: Easy

Status: Not tested v3

Table of contents

  1. Command prompt
  2. Bash completion

Command prompt

You can prettify your command prompt for each user by enabling color output and setting a custom prompt.

  • Open and edit .bashrc as shown below, save and exit $ nano /home/admin/.bashrc
# enable color prompt (uncomment)

# pimp prompt (replace the PS1 line)
PS1="${debian_chroot:+($debian_chroot)}\[\e[33m\]\u \[\033[01;34m\]\w\[\e[33;40m\]\[\e[m\] "

# set "ls" to always use the -la option (insert at the end of the file)
alias ls='ls -la --color=always'

Pimp prompt

  • Reload configuration source /home/admin/.bashrc

Pimped prompt

Bash completion

As user “admin”, install bash completion scripts for Bitcoin Core and all Lightning projects. You then can complete commands by pressing the Tab key (e.g. bitcoin-cli getblockch [Tab] → bitcoin-cli getblockchaininfo )

$ cd /home/admin/download
$ wget
$ wget
$ sudo cp *.bash-completion /etc/bash_completion.d/

Bash completion will be enabled after your next login.

« Back: + Raspberry Pi