Results 1 to 3 of 3

Thread: How to change "-bash-4.2#" in terminal?

  1. #1
    Join Date
    Sep 2014
    Location
    Shah Alam, Malaysia
    Posts
    68

    Default How to change "-bash-4.2#" in terminal?

    Recently I bought a VPS and installed openSUSE 13.1 minimal.
    but the prompt just shows static "-bash-4.2#" like this:


    instead of the usual default I found in my other boxes:

    it has red root name, last access time, showing current path etc

    how do I change this? Its confusing and bothering me so much.

    there are no ~/.bashrc in any of my boxes to copy from each other.

  2. #2

    Default Re: How to change "-bash-4.2#" in terminal?

    Quote Originally Posted by razirazo View Post
    Recently I bought a VPS and installed openSUSE 13.1 minimal.
    but the prompt just shows static "-bash-4.2#" like this:


    instead of the usual default I found in my other boxes:

    it has red root name, last access time, showing current path etc

    how do I change this? Its confusing and bothering me so much.

    there are no ~/.bashrc in any of my boxes to copy from each other.

    Hi,

    Im not sure about VPS since those things might have their own policy about some things including the prompt but if it is a minimal install then you can just try to create a ~/.bashrc if you like and the prompt is defined by the value of "$PS1" you can try

    Code:
    echo "$PS1"
    In openSUSE the value of PS1 is defined in the file

    Code:
    /etc/bash.bashrc
    Assuming of course you're using bash as your log-in shell.
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  3. #3
    Join Date
    Sep 2014
    Location
    Shah Alam, Malaysia
    Posts
    68

    Default Re: How to change "-bash-4.2#" in terminal?

    Thanks.

    But im not sure why, the prompt was automagically get in shape after I finished setting up my webserver stack and reboot.

    I think it got pulled somewhere as part of package dependencies but not sure which was it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •