Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 33 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.