Forum users
  • Please read this before asking for help, and don't forget to add Quick System Info to help requests!
  • Please follow the Forum Rules

Current releases
--MX-21 release info here
--Migration information to MX-21 here
--antiX-21 (Grup Yorum) release info here

Important information
-- Spectre and Meltdown vulnerabilities

-- MX Linux on social media: here
-- New Forum Features, Marking Solved and Referencing a User: here

Terminal Configuration

Post Reply
Posts: 5
Joined: Sat Feb 12, 2022 3:01 am

Terminal Configuration

#1 Post by geffers »

Hi Folks,

Relatively new user to MX Linux

On the terminal one gets the PWD then $ prompt on next line. Certainly not a major issue but I would like the prompt on the same line as my PWD.

Looked through the .bashrc file and can't find anything obvious, if I temporarily rename the .bashrc file then the terminal shows PWD and prompt on same line but if I restore the .bashrc file then again in is on following line.

Appreciate if someone could point me in the right direction for this, understand bash scripts but not functions and variables too well.


User avatar
Posts: 20806
Joined: Sun Dec 16, 2007 1:17 pm

Re: Terminal Configuration

#2 Post by dolphin_oracle »

in this area of ~/.bashrc,

Code: Select all

if [ "$UID" = 0 ]; then
    PS1="$red\u$nc@$red\H$nc:$CYAN\w$nc\\n$red#$nc "
    PS1="$PURPLE\u$nc@$CYAN\H$nc:$GREEN\w$nc\\n$GREEN\$$nc "
remove the \\n from in front of the $GREEN\$$nc. \n is a new line, and the first slash is an escape character so the \n gets processed as a new line instead of a text character.
lenovo ThinkPad T530 - MX-21
FYI: mx "test" repo is not the same thing as debian testing repo.

Posts: 5
Joined: Sat Feb 12, 2022 3:01 am

Re: Terminal Configuration

#3 Post by geffers »

dolphin_oracle That was a quick reply.

Thank you, didn't think to look at the code that included colour but as mentioned, understand a little bash scripting but not too much of the functions.

Tried it, works fine.

Thanks you again for prompt reply.


Post Reply

Return to “Software / Configuration”