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 would like to configure the terminal so that it would leave a line after running a command. Just to make stuff cleaner. There is no such setting in "profile preferences".

I'm running 12.10.

share|improve this question
up vote 3 down vote accepted

To alter how bash works you need to edit the hidden file ~/.bashrc

gedit ~/.bashrc

First find the section that look like this:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

and change it slightly to look like this (or cut and paste this in replacing the existing section).

###Changed prompt to print a \n 'new line' before user@machine###
if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\n\u@\h:\w\$ '

The difference is subtle - just added an escaped newline '\n' before the user@machine prompt. Save the file and exit the terminal window. Changes will take effect next time you open a terminal window or log in to a console.

The reason you have to change both of the lines is that the first one is for the colour prompt, while the second one is for the default monochrome prompt. Actually, before you add in the new line, try the colour prompt first. It does help to delineate the prompt/command/result each time. You might like it. All you have to do is find the slightly earlier line that looks like


and uncomment it by removing the hash:

share|improve this answer
The "force_color_prompt" is brilliant, exactly what I needed! – Martin Hallén Nov 25 '12 at 13:06

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.