Ask Your Question
1

How to reset terminal back to show" [user@localhost user]$ " instead of bash-4.2#

asked 2013-11-01 11:43:24 -0600

Avik gravatar image

updated 2014-09-27 20:39:20 -0600

mether gravatar image

HI,I am Avik..I am using Fedora-19 Gnome..recently fedora terminal encountered a problem it is showing " bash-4.2# " instead of " [user@localhost user]$ " all commands are working fine .. all system is ok.. but don't know why this is showing. Please help..

edit retag flag offensive close merge delete

Comments

1

What is the output of: id; ps

marcindulak gravatar imagemarcindulak ( 2013-11-01 11:50:31 -0600 )edit
1

Hello, what is output of 'echo $PS1'

baptistemm gravatar imagebaptistemm ( 2013-11-01 11:56:00 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-11-02 00:08:22 -0600

Avik gravatar image

Thank you,for your kind help,i had managed by copying bashrc and all other bash files to my home directory from root.. and all things are fine now...

thanks once again...

edit flag offensive delete link more

Comments

In this case the most probable reason for the problem was missing /etc/bashrc initialization ("Source global definitions") in user's ~/.bashrc (due to manual edits). The ~/.bashrc file is by default created with the contents of /etc/skel/.bashrc - see "skel" description in man useradd, and copying root's /root/.bashrc to ~/.bashrc restored sourcing of /etc/bashrc which sets the PS1 variable

marcindulak gravatar imagemarcindulak ( 2013-11-12 09:08:45 -0600 )edit
1

answered 2013-11-01 14:10:32 -0600

Hi: Edit your .bash_profile and put a line

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

And make sure that you /etc/passwd looks something like

casep:x:1000:1000:Carlos "casep" Sepulveda:/home/casep:/bin/bash

Kind regards

edit flag offensive delete link more

Comments

1

Avik may be running as root - we need to exclude that possibility first

marcindulak gravatar imagemarcindulak ( 2013-11-01 14:14:55 -0600 )edit
0

answered 2016-03-22 00:44:12 -0600

TWork gravatar image

It is very simple. You have to do these followings.

1.First open your terminal and type;

             vi ~/.bashrc
  1. Then you get the vi editor. In vi editor type;

             export PS1="[\u@\h \W]\$"
             export PS2=">"
    
  2. Then you have to save this using; :wq

  3. Then type;

             ~/.bashrc
    

You can enjoy now!!!!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-11-01 11:43:24 -0600

Seen: 7,701 times

Last updated: Nov 02 '13