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

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:

name@machine:~$
_

Thanks.

share|improve this question
add comment

1 Answer

up vote 15 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
4  
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
1  
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
add comment

Your Answer

 
discard

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.