Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"

To explain how this works, PS1 is the variable containing what should be displayed as the prompt. All this is saying is "set PS1 to the previous contents of PS1, with a newline character prepended". Putting it in .bashrc on most distros just makes bash run it every time you open an interactive shell (but not a login shell - see Difference between Login Shell and Non-Login Shell?Difference between Login Shell and Non-Login Shell?).

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"

To explain how this works, PS1 is the variable containing what should be displayed as the prompt. All this is saying is "set PS1 to the previous contents of PS1, with a newline character prepended". Putting it in .bashrc on most distros just makes bash run it every time you open an interactive shell (but not a login shell - see Difference between Login Shell and Non-Login Shell?).

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"

To explain how this works, PS1 is the variable containing what should be displayed as the prompt. All this is saying is "set PS1 to the previous contents of PS1, with a newline character prepended". Putting it in .bashrc on most distros just makes bash run it every time you open an interactive shell (but not a login shell - see Difference between Login Shell and Non-Login Shell?).

Add explanation of how this actually works.
Source Link

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"

To explain how this works, PS1 is the variable containing what should be displayed as the prompt. All this is saying is "set PS1 to the previous contents of PS1, with a newline character prepended". Putting it in .bashrc on most distros just makes bash run it every time you open an interactive shell (but not a login shell - see Difference between Login Shell and Non-Login Shell?).

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"

To explain how this works, PS1 is the variable containing what should be displayed as the prompt. All this is saying is "set PS1 to the previous contents of PS1, with a newline character prepended". Putting it in .bashrc on most distros just makes bash run it every time you open an interactive shell (but not a login shell - see Difference between Login Shell and Non-Login Shell?).

Source Link
Slothworks
  • 495
  • 1
  • 5
  • 17

One way to achieve this is by modifying the .bashrc file. Simply place the following at the end of the .bashrc file.

PS1="\n$PS1"