Useful Commands

In this article I will place different tips and tricks for git/bash/sed…

But let’s start with setting bash prompt: export PS1=”\e[1;34m[\t]\e[0;32m\w>\e[0m”

it changes prompt to this one: 

In short:

  • \e[1;34m – Begin color changes to light blue
  • [\t] – Place current time between two brackets
  • \e[0;32m – Begin color changes to green
  • \w> – Place current working directory and sign ‘less’ after it
  • \e[0m – Finish color changes

which is more convenient for me because I see how long previous command was executed and where is my current working directory in this shell (most of the time I have opened at least several shells)More details for such customization you can find here: How To Change or Customize Bash Prompt In Linux {25 Options} (phoenixnap.com)

Leave a comment

Design a site like this with WordPress.com
Get started