Stop Microsoft
Operating Systems => Linux and UNIX => Topic started by: Master of Reality on 15 February 2003, 02:16
-
in slackware how do i change it so that it says "mor@xen:/dir$" instead of the "bash-2.05a$" that comes up when i open a term.?
-
I think in ~/.bashrc
#man bash
and look at the PS1 PS2 PS3 (Prompt String)entries
-
yep, i get that bash2.05 thing too, because i deleted my .bashprofile or .bashrc or whatever (in a fit of rage). when i su to root, it gives me my current directory and all that crap before the # prompt, because root still has a .bashrc file.
-
cd into your home directory.
vi .bashrc
add the following
# set prompt: ``username@hostname:/directory $ ''
PS1="[\u@\h:\w] "
case `id -u` in
0) PS1="${PS1}# ";;
*) PS1="${PS1}$ ";;
esac
save it, exit your shell, and then next time you open it should work.