Ask Your Question

Username@machine in gnome terminal

asked 2015-05-29 01:17:11 -0500

Steemx gravatar image

updated 2015-05-29 08:45:01 -0500

FranciscoD_ gravatar image

Hello, ive installed fedora 22 workstation and now i noticed the gnome terminal is not displaying the username and machine names like in fedora 21 or any other distro it only say bash-4.3$, how can display the username@machine$ ?

Thanks in advance.

ps: sorry my english.

edit retag flag offensive close merge delete


Thanks for all the answers.

Steemx gravatar imageSteemx ( 2015-05-29 11:06:24 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2015-05-29 06:21:14 -0500

masteroman gravatar image

As i see by your pasebin link in one of the comments you don't have defined your PS1 but I don't think that you should have it explicitly defined there as it should already be specified in your /etc/bashrc. Anyway, if you want to have default PS1 prompt place this code on the bottom of your ~/.bashrc :

export PS1="[\u@\h \W]\$"

and after thas issue:

source ~/.bashrc
edit flag offensive delete link more



Thanks bro, this worked like a charm.

Steemx gravatar imageSteemx ( 2015-05-29 11:05:48 -0500 )edit

Now, as I double-checked your situation I believe solution that leigh123linux proposed would be better because you don't load /etc/bashrc in your ~/.bashrc and this PS1 is already specified there. So, another solution is, as he said, to put:

if [ -f /etc/bashrc ]; then
    . /etc/bashrc

in your ~/.bashrc

masteroman gravatar imagemasteroman ( 2015-05-29 13:08:23 -0500 )edit

answered 2015-05-29 06:46:03 -0500

geforce gravatar image

updated 2015-05-29 06:49:53 -0500

You need to edit /home/steemx/.bashrc to

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc

# Uncomment the following line if you don't like systemctl's auto-paging feature:

# User specific aliases and functions
edit flag offensive delete link more

answered 2015-05-29 01:50:31 -0500

geforce gravatar image

Can you post the output for

ls -l $HOME/.bashrc


cat $HOME/.bashrc
edit flag offensive delete link more

Comments cannot post the bashrc here, character limit reached.

Steemx gravatar imageSteemx ( 2015-05-29 02:31:31 -0500 )edit

answered 2015-05-29 01:37:52 -0500

Santosh Ghimire gravatar image

updated 2015-05-29 01:38:47 -0500

login with your desired username. You can also create a user for different name you may like.

then for machine part try

hostnamectl set-hostname <your desired machine name>


hostname <desired machine name>

then exit terminal and open again ps. this is just the temporary solution.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-05-29 01:17:11 -0500

Seen: 414 times

Last updated: May 29 '15