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 :slight_smile:

Thank you very much for any of your answers.

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

Best regards,

http://www.mediafire.com/?w5ud34rh0gs6ae7

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,

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

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)

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…

http://thumbnails104.imagebam.com/21356/3cfb46213558777.jpg](http://www.imagebam.com/image/3cfb46213558777)

It should be out in the repo’s soon the version is 2.2.4
https://build.opensuse.org/package/show?package=bashish&project=home%3Amalcolmlewis%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

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:


denverd@linux-os114

but, when i then “su -” to root it looks like


linux-os114:~ #

and, if i close Konsole and reopen it will be


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

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.

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,