Results 1 to 9 of 9

Thread: Terminal prompt

  1. #1
    Join Date
    Jul 2012
    Location
    Montevideo
    Posts
    32

    Question Terminal prompt

    Howdy,

    Im looking for change the "user@linux>" tag in the terminal but i can't find where it is.

    Im on KDE opensuse 12.2

    In GNOME it was easy, but im new in KDE and im gettin used to it

    Thank you very much for any of your answers.

    I leave a pic just in case im not explained it very well.

    Best regards,


  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Terminal prompt

    Quote Originally Posted by m1cky64 View Post
    Howdy,

    Im looking for change the "user@linux>" tag in the terminal but i can't find where it is.

    Im on KDE opensuse 12.2

    In GNOME it was easy, but im new in KDE and im gettin used to it

    Thank you very much for any of your answers.

    I leave a pic just in case im not explained it very well.

    Best regards,
    You did not say what you wanted to do with it? user@linux is your user name '@' sign and your PC Host name. Here is a link about the terminal prompt:

    How to: Change / Setup bash custom prompt (PS1)

    By the way, your cloud share mediafire image/link did not come through and should likely be left out of any future messages.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,864
    Blog Entries
    15

    Default Re: Terminal prompt

    Quote Originally Posted by m1cky64
    Howdy,

    Im looking for change the "user@linux>" tag in the terminal but i can't
    find where it is.

    Im on KDE opensuse 12.2

    In GNOME it was easy, but im new in KDE and im gettin used to it

    Thank you very much for any of your answers.

    I leave a pic just in case im not explained it very well.

    Best regards,

    [image: http://www.mediafire.com/?w5ud34rh0gs6ae7]

    Hi
    You need to edit (assuming it's bash) ~/.bashrc, if you look at the man
    page for bash and search, hit / and enter PROMPTING it gives you all
    the options etc...

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
    up 1 day 6:30, 3 users, load average: 0.05, 0.07, 0.05
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Terminal prompt

    On 2012-10-05 02:46, jdmcdaniel3 wrote:
    > By the way, your cloud share mediafire image/link did not come through
    > and should likely be left out of any future messages


    If you download the file, it is a normal png file.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  5. #5
    Join Date
    Jul 2012
    Location
    Montevideo
    Posts
    32

    Default Re: Terminal prompt

    Thank you guys, i think the image is pending from approval or something.

    The thing is, in my konsole, it says

    linux-0vlo:~ #


    And i hate it.. i want to change it for something like my user@host or something.

    I've changed it PS1 but then when i open the konsole again says linux-0vlo:~ # again, and it just changes the user prompt, not the root.

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,864
    Blog Entries
    15

    Default Re: Terminal prompt

    Quote Originally Posted by m1cky64
    Thank you guys, i think the image is pending from approval or something.

    The thing is, in my konsole, it says

    LINUX-0VLO:~ #
    And i hate it.. i want to change it for something like my user@host or
    something.

    I've changed it PS1 but then when i open the konsole again says
    *linux-0vlo:~ # *again, and it just changes the user prompt, not the
    root.

    Hi
    Have you set your hostname via YaST network devices under the
    hostname/dns tab?

    In the article linked to, I've built and published 'bashism' if your
    wanting to try that out as well....



    It should be out in the repo's soon the version is 2.2.4
    https://build.opensuse.org/package/s...3AMiscellanous

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
    up 1 day 10:34, 3 users, load average: 0.08, 0.07, 0.07
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU


  7. #7
    dd@home.dk NNTP User

    Default Re: Terminal prompt

    On 10/05/2012 05:06 AM, m1cky64 wrote:
    > I've changed it PS1 but then when i open the konsole again says
    > *linux-0vlo:~ # *again, and it just changes the user prompt, not the
    > root.


    it sounds like you are logged into KDE as root (rather than being logged
    in as yourself).

    when i am logged into KDE as myself and open Konsole my prompt looks like:
    Code:
    denverd@linux-os114
    but, when i then "su -" to root it looks like
    Code:
    linux-os114:~ #
    and, if i close Konsole and reopen it will be
    Code:
    denverd@linux-os114
    again, every time.. _every_ time!

    now, if i wanted to change my prompt to something other than
    denverd@linux-os114, that can be done as others have told how....BUT, if
    you are logged into KDE as root, _every_ Konsole you open will be
    root...every time.

    which is something you should *never* see, because you should never log
    into KDE/GNOME/LXDE/Xfce or any other *nix-like system's graphical user
    interface desktop environment as root..

    doing so 1) opens you up to several different security problems if you
    (for example) browse the net, 2) too many, far too easy ways to damage
    your system no matter how careful your actions (for example: well
    documented cases of unintended change of ownership of ~/.ICEauthority
    and ~/.Xauthority from user to root sometimes occurs), 3) anyway logging
    into KDE/etc as root is *never* required to do any and all
    administrative duties, 4) and, not even logging in as root just to see
    if it works as root is useful, because the "yes" or "no" learned is
    almost always totally useless in finding the problem giving the
    symptoms...while, logging into the GUI as root to learn the yes/no could
    _cause_ the next adverse symptom encountered.

    so, always log in as yourself, and "become root" by using a root powered
    application (like YaST, File Manager Superuser Mode) or using "su -",
    sudo, kdesu, or gnomesu in a terminal to launch whatever tool is needed
    (like Kwrite to edit a config file)...read more on the correct ways to
    do that here:

    http://tinyurl.com/593e4c
    http://tinyurl.com/ydbwssh
    http://www.linfo.org/root.html

    additionally: after logging into KDE/Gnome/etc as root, if you
    experience problems (for example, with uncommanded file ownership and
    permissions changes) and if you can provide us with details of what you
    were doing while you were logged in as root, that would help us identify
    if there's a bug that needs to be fixed...thanks for your help..

    --
    dd
    http://tinyurl.com/DD-Caveat

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,788

    Default Re: Terminal prompt

    Quote Originally Posted by m1cky64 View Post
    Thank you guys, i think the image is pending from approval or something.

    The thing is, in my konsole, it says

    linux-0vlo:~ #


    And i hate it.. i want to change it for something like my user@host or something.

    I've changed it PS1 but then when i open the konsole again says linux-0vlo:~ # again, and it just changes the user prompt, not the root.
    When the prompt ends in a # it is most probably the prompt of a root session.
    That is NOT what you explained. And thus you changed files of the end-user you are using.. And thus the prompt of a normal, not superuser, terminal session.
    Henk van Velden

  9. #9
    Join Date
    Jul 2012
    Location
    Montevideo
    Posts
    32

    Red face Re: Terminal prompt

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Have you set your hostname via YaST network devices under the
    hostname/dns tab?

    In the article linked to, I've built and published 'bashism' if your
    wanting to try that out as well....



    It should be out in the repo's soon the version is 2.2.4
    https://build.opensuse.org/package/s...3AMiscellanous

    --
    Cheers Malcolm °¿° (Linux Counter #276890)
    openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
    up 1 day 10:34, 3 users, load average: 0.08, 0.07, 0.07
    CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU
    Howdy malcolmlewis

    You were right, I did modified the hostname but not in YaST.

    Now I've named it like i wanted it.

    I wrote the "linux-0vlo:~ #" just to show you an example, because the "0vlo" was not only in my root terminal but in the user prompt also.

    I work with networks and many times im doing tests in the terminal, the "linux-0vlo:~ #" was the closest example i've had, so i've copy/pasted it (:

    Thanks for all your answers.

    Best regards,

Tags for this Thread

Posting Permissions

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