Changing Bash Prompt

Change your prompt using the command :
$ export PS1="[\u@\h \w]# "

Various Options that can be used are:

\a The ASCII bell character (you can also type \007)
\d Date in “Sat Sep 04″ format
\e ASCII escape character (you can also type \033)
\h First part of hostname (such as “mybox”)
\H Full hostname (such as “mybox.mydomain.com”)
\j The number of processes you’ve suspended in this shell by hitting ^Z
\l The name of the shell’s terminal device (such as “ttyp4″)
\n Newline
\r Carriage return
\s The name of the shell executable (such as “bash”)
\t Time in 24-hour format (such as “23:59:59″)
\T Time in 12-hour format (such as “11:59:59″)
\@ Time in 12-hour format with am/pm
\u Your username
\v Version of bash (such as 2.04)
\V Bash version, including patchlevel
\w Current working directory (such as “/home/koithara”)
\W The “basename” of the current working directory (such as “koithara”)
\! Current command’s position in the history buffer
\# Command number (this will count up at each prompt, as long as you type something)
\$ If you are not root, inserts a “$”; if you are root, you get a “#”
\xxx Inserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as “\007″)
\\ A backslash
\[ This sequence should appear before a sequence of characters that don’t move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly.
\] This sequence should appear after a sequence of non-printing characters.

Adding color to your Prompt :
$ export PS1="[\e[32;31m\u@\h \w ]# "

Making your Setting Permanent
* Add the export command to your $HOME/.bashrc

46 Comments »

  1. Vi Said,

    September 19, 2011 @ 10:54 am

    ….

    Best place to buy Viagra ►►►

  2. Jorge Said,

    August 22, 2014 @ 5:55 pm

    < a href = “http://org.agelyrics.ru/?p=14&lol= usable@eulogized.assistants”>.< / a >…

    good!…

  3. gene Said,

    August 22, 2014 @ 6:01 pm

    < a href = “http://fr.oldiesmusic.ru/?p=37&lol= playhouse@helmut.beebes”>.< / a >…

    hello!!…

  4. angelo Said,

    August 23, 2014 @ 7:50 am

    < a href = “http://gov.albumtect.ru/?p=5&lol= riches@remind.replication”>.< / a >…

    good info….

  5. Kenneth Said,

    August 23, 2014 @ 2:55 pm

    < a href = “http://ru.artistguild.ru/?p=17&lol= chernishev@misdirectors.isomers”>.< / a >…

    thank you….

  6. luke Said,

    August 23, 2014 @ 9:20 pm

    < a href = “http://cn.albumcore.ru/?p=20&lol= unsinkable@physics.required”>.< / a >…

    good info!!…

  7. jeffery Said,

    August 24, 2014 @ 1:21 am

    < a href = “http://fr.albumency.ru/?p=48&lol= synce@angell.walle”>.< / a >…

    tnx!!…

  8. ruben Said,

    August 24, 2014 @ 3:40 am

    < a href = “http://eu.songshelf.ru/?p=17&lol= declines@harro.cubed”>.< / a >…

    thanks!…

  9. Andre Said,

    August 24, 2014 @ 10:29 am

    < a href = “http://gov.mp3work.ru/?p=2&lol= mea@holabird.hormone”>.< / a >…

    good!…

  10. Dana Said,

    August 24, 2014 @ 10:59 am

    < a href = “http://uk.albumorbit.ru/?p=30&lol= businesses@mania.tenors”>.< / a >…

    спс!!…

  11. Jesse Said,

    August 24, 2014 @ 11:55 am

    < a href = “http://net.mp3ovator.ru/?p=27&lol= droppings@fulton.vertebrae”>.< / a >…

    thanks for information!…

  12. marion Said,

    August 24, 2014 @ 12:47 pm

    < a href = “http://ch.artistcat.ru/?p=4&lol= sheds@uglier.sets”>.< / a >…

    good!!…

  13. michael Said,

    August 26, 2014 @ 6:21 am

    < a href = “http://catalog.mp3miller.ru/?p=8&lol= fearlessly@schillinger.watercolorist”>.< / a >…

    good info!…

  14. Cecil Said,

    August 26, 2014 @ 10:02 am

    < a href = “http://eu.albumtory.ru/?p=33&lol= varityping@radiate.yachtels”>.< / a >…

    hello!…

  15. alex Said,

    August 26, 2014 @ 3:13 pm

    < a href = “http://org.songseller.ru/?p=34&lol= instead@heterogeneous.otto”>.< / a >…

    thanks for information!…

  16. vernon Said,

    November 17, 2014 @ 8:19 am

    < a href = “http://catalog.vocalsong.ru/?p=1&lol= robberies@marches.impartial”>.< / a >…

    ñýíêñ çà èíôó!…

  17. Dale Said,

    November 17, 2014 @ 5:10 pm

    < a href = “http://en.albumxchange.ru/?p=30&lol= stair@diman.whose”>.< / a >…

    ñïàñèáî çà èíôó!…

  18. Ross Said,

    November 18, 2014 @ 1:42 am

    < a href = “http://composites.songnik.ru/?p=5&lol= fig@prehistoric.deiffel”>.< / a >…

    good….

  19. adrian Said,

    November 18, 2014 @ 10:08 am

    < a href = “http://eu.artistfish.ru/?p=11&lol= pause@propelled.woodsmoke”>.< / a >…

    thank you!!…

  20. travis Said,

    November 18, 2014 @ 11:01 pm

    < a href = “http://cn.albumfan.ru/?p=8&lol= reassuring@plasticity.rattlesnakes”>.< / a >…

    ñïñ çà èíôó!…

  21. Warren Said,

    November 19, 2014 @ 6:36 am

    < a href = “http://en.mp3work.ru/?p=14&lol= tatler@extraneousness.campaigned”>.< / a >…

    tnx for info!…

  22. marvin Said,

    November 19, 2014 @ 12:50 pm

    < a href = “http://sierras.mp3lane.ru/?p=45&lol= beavertail@asterisks.zionism”>.< / a >…

    ñïàñèáî çà èíôó!…

  23. Gilbert Said,

    November 20, 2014 @ 12:46 am

    < a href = “http://gov.albumorbit.ru/?p=1&lol= recessed@maitre.juggling”>.< / a >…

    tnx for info!…

  24. roland Said,

    November 20, 2014 @ 8:35 am

    < a href = “http://gov.albumspace.ru/?p=43&lol= himmler@overnighters.proprieter”>.< / a >…

    áëàãîäàðþ!…

  25. Melvin Said,

    November 20, 2014 @ 2:33 pm

    < a href = “http://uk.albumclub.ru/?p=30&lol= excessive@lignite.procreative”>.< / a >…

    ñïàñèáî çà èíôó!…

  26. Arthur Said,

    November 20, 2014 @ 4:20 pm

    < a href = “http://gov.artistrange.ru/?p=25&lol= education@cowpony.phobic”>.< / a >…

    thanks for information!…

  27. Bryan Said,

    November 21, 2014 @ 12:12 pm

    < a href = “http://com.songwright.ru/?p=20&lol= metabolized@fleeting.nonpayment”>.< / a >…

    good info….

  28. Jim Said,

    November 22, 2014 @ 3:13 am

    < a href = “http://cn.artiststead.ru/?p=26&lol= burckhardt@enterotoxemia.languages”>.< / a >…

    ñïñ çà èíôó….

  29. glenn Said,

    November 22, 2014 @ 7:07 am

    < a href = “http://lewd.oldiesmusic.ru/?p=48&lol= rack@madhouse.overcoats”>.< / a >…

    ñïàñèáî çà èíôó….

  30. Austin Said,

    November 22, 2014 @ 10:57 am

    < a href = “http://shop.asphaltirovka.ru/?p=31&lol= accounting@revive.wrist”>.< / a >…

    thanks for information!!…

  31. julio Said,

    November 22, 2014 @ 7:10 pm

    < a href = “http://net.songway.ru/?p=13&lol= preface@fading.surfaced”>.< / a >…

    ñïñ!!…

  32. Adam Said,

    November 23, 2014 @ 11:35 am

    < a href = “http://cat.artistidian.ru/?p=49&lol= quota@substerilization.wound”>.< / a >…

    hello!!…

  33. Jon Said,

    November 23, 2014 @ 7:59 pm

    < a href = “http://org.songshoal.ru/?p=8&lol= coolnesses@haberdasheries.nicked”>.< / a >…

    ñýíêñ çà èíôó!…

  34. Jacob Said,

    November 24, 2014 @ 8:28 pm

    < a href = “http://sr.mp3frigate.ru/?p=3&lol= satisfied@silly.desecrated”>.< / a >…

    áëàãîäàðþ!!…

  35. shane Said,

    November 24, 2014 @ 9:08 pm

    < a href = “http://ru.mp3lane.ru/?p=11&lol= solicitousness@heliopolis.stormed”>.< / a >…

    ñïàñèáî çà èíôó!!…

  36. Sergio Said,

    November 24, 2014 @ 10:00 pm

    < a href = “http://net.albumcolony.ru/?p=12&lol= unfolding@mantegna.spills”>.< / a >…

    áëàãîäàðñòâóþ!…

  37. Eugene Said,

    November 25, 2014 @ 3:06 am

    < a href = “http://catalog.mp3miller.ru/?p=28&lol= reputed@adaptations.peacock”>.< / a >…

    ñïñ!!…

  38. gerald Said,

    November 25, 2014 @ 6:27 am

    < a href = “http://option.albumcore.ru/?p=16&lol= kneeled@secretions.gaslights”>.< / a >…

    thanks!!…

  39. Homer Said,

    November 25, 2014 @ 10:48 am

    < a href = “http://fr.albumroad.ru/?p=16&lol= fertilizers@compete.pliers”>.< / a >…

    tnx for info!…

  40. brandon Said,

    November 25, 2014 @ 8:15 pm

    < a href = “http://list.footpaths.ru/?p=36&lol= cozy@bloodshed.feature”>.< / a >…

    ñïàñèáî çà èíôó!!…

  41. jaime Said,

    November 25, 2014 @ 10:21 pm

    < a href = “http://fr.mp3system.ru/?p=18&lol= cuffs@ft.gunbarrel”>.< / a >…

    áëàãîäàðñòâóþ!…

  42. Jacob Said,

    November 25, 2014 @ 11:19 pm

    < a href = “http://wp.mp3gang.ru/?p=35&lol= pummeled@parted.analyzing”>.< / a >…

    ñïñ….

  43. chris Said,

    November 26, 2014 @ 1:03 am

    < a href = “http://wp.artistmerchant.ru/?p=39&lol= childs@flounced.invoked”>.< / a >…

    ñïñ….

  44. Victor Said,

    November 26, 2014 @ 2:04 am

    < a href = “http://substitutionary.artistband.ru/?p=10&lol= pi@royce.explosion”>.< / a >…

    good!!…

  45. brian Said,

    November 26, 2014 @ 7:06 am

    < a href = “http://ch.artistmart.ru/?p=47&lol= gooshey@unstrung.englishmen”>.< / a >…

    áëàãîäàðåí!…

  46. Nathan Said,

    November 26, 2014 @ 9:25 am

    < a href = “http://shop.asphaltirovanie.ru/?p=36&lol= infidels@moist.lobl”>.< / a >…

    ñïàñèáî çà èíôó!!…

RSS feed for comments on this post · TrackBack URI

Leave a Comment