Ubuntu – How to shorten your command line prompt (bash) like Spatry does it

command line

I got the following screenshot from a Spatry linux video from https://www.youtube.com/watch?v=ROyqnJg1Ipo

my command line is usually long. so i prefer whole of current path in 1st line and command prompt in next

I want something like this on every prompt

----[myusername@laptop]------[14:30:44]----/mnt/1CFED66BFED63CA8/router/Documents/hacking/1 set up tools/wifiphisher

Best Answer

Assuming you're using bash, place a line like:

PS1="----[\u@\H]------[\t]----\w\n==> "

into your ~/.bashrc file, which will set your bash prompt to what you want. If you want to change it further, just consult the page http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html