Results 1 to 6 of 6

Thread: about bash prompt

  1. #1

    Default about bash prompt

    At the command line I see my username and some kind of garble which has the form of `linux-<garble>`. Why is this so and can I change it? Is it the desktop name? (I don't recall I named it that at the installation.)

  2. #2
    ab@novell.com NNTP User

    Default Re: about bash prompt

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    This is probably your hostname, and you probably have it to set itself
    via DHCP. Go to Yast: Network Devices: Network Card. There is an
    option in here where you can specify a host name and name servers and a
    checkbox is there below your host name field to change your host name
    via DHCP. Uncheck that and give your box a name you like.

    Good luck.





    lxxxiii wrote:
    > At the command line I see my username and some kind of garble which has
    > the form of `linux-<garble>`. Why is this so and can I change it? Is it
    > the desktop name? (I don't recall I named it that at the installation.)
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFI2BY93s42bA80+9kRAtyIAKCBaEq1lAT/1NR/IqerQllvWUKydwCghzaT
    mf4qgMrmZ6Ld4T1NbsDwAb4=
    =U/6b
    -----END PGP SIGNATURE-----

  3. #3

    Default Re: about bash prompt

    Thanks. I noticed that, if the computer is not connected to the network upon boot, it shows the name I chose at installation.

    But is it possible to change the overall look of the prompt? For example, can I remove the > and the : ?

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: about bash prompt

    Code:
    $ export PS1='Yes, master? '
    Yes, master?

  5. #5

  6. #6
    ab@novell.com NNTP User

    Default Re: about bash prompt

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    For fun... here is my prompt. I love this thing, though it's huge I
    have come to rely on it:

    <quote file="~/.bashrc">
    #Added by me 2008-05-28 11:07:00.
    export PS1='\D{%Y-%m-%d %H:%M:%S} Jobsj Err:$?\n\u@\hw> '
    #End Added by me 2008-05-28 11:07:00.
    </quote>

    Shows error level from previous command, number of current jobs, current
    timestamp (to second), username, host, directory....

    Good luck.





    KJ44 wrote:
    > http://tldp.org/HOWTO/Bash-Prompt-HOWTO/
    > 'Tip: Prompt magic'
    > (http://www.ibm.com/developerworks/li.../l-tip-prompt/)
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.2 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFI2RlY3s42bA80+9kRAkGlAJ4tKrl9vtBVzzlhblrl12/3epVuQgCdFKpy
    AVvRoYQsQECi3ruGeS+TwhY=
    =iDzA
    -----END PGP SIGNATURE-----

Posting Permissions

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