Ask Your Question
2

Username@machine in gnome terminal

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

Steemx gravatar image

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

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

Comments

Thanks for all the answers.

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

4 Answers

Sort by ยป oldest newest most voted
2

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

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

Comments

1

Thanks bro, this worked like a charm.

Steemx gravatar imageSteemx ( 2015-05-29 11:05:48 -0600 )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
fi

in your ~/.bashrc

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

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

geforce gravatar image

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

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

# .bashrc

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

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

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

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

geforce gravatar image

Can you post the output for

ls -l $HOME/.bashrc

and

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

Comments

http://pastebin.com/R4KDxcgT cannot post the bashrc here, character limit reached.

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

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

Santosh Ghimire gravatar image

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

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>

or

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

Stats

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

Seen: 406 times

Last updated: May 29 '15