How to fix trouble with [User] in Konsole terminal?

My usename is “cosmo”, but in the terminal konsole always is there: “-ms7d14”. For root user also is there. What is the solution for this little trouble?

What’s after the @ is the hostname of your computer (chosen during the installation)

1 Like

You can change the prompt if you want (BASH):

1 Like

Is it necessary for the “hostname” to be there, and is it possible for the “user” to be without it in the “Konsole terminal”? Or, to simplify… how I can change the “hostname”?

You need to modify your bash prompt for it not to display the hostname anymore. See here.

Also on this site you can create your own prompt.

For example put this into your .bashrc file for just the username.

PS1='[\u]\$ ’

1 Like

I have successfully done that, but now when I access with root, the problem is the same. My question is is it safe to make bashrc file with the same data, because on the /root/bashrc. file is empty!?
user_trouble2

It is safe.
If you have a feeling you might mess something up, just backup your root’s .bashrc with the command cp .bashrc .bashrc.bak (when logged as root).
Then, append the line PS1='[\u]\$ ’ to your root’s .bashrc file, save, reload the shell and you’re good to go!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.