Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I wish to add a new line on every prompt. Instead of the cursor showing on the line as name@machine:~$ _,

I want it to be on the next line, like as:



share|improve this question

1 Answer 1

up vote 23 down vote accepted
  • Open the file ~/.bashrc (or /etc/bash.bashrc if it should work globally for all users).

  • Locate the variable called PS1.

  • Simply put an \n at the end of the value of the PS1 variable.

share|improve this answer
The easiest way to do this is to add PS1="$PS1\n" to the bottom of your ~/.bashrc file. –  Dennis VanMeter Dec 6 '10 at 14:09
Guess that's easier to maintain - why don't make it a new answer? :) –  htorque Dec 6 '10 at 14:44
yeah, I did that. there were too many lines to append a \n to, So i created a new variable. –  theTuxRacer Dec 6 '10 at 17:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.