imdeemvp Posted January 5, 2005 Report Share Posted January 5, 2005 Hello guys.... I want to know which file to edit so my terminal will say [imdeemvp@mymdk10.1]$ instead of [imdeemvp@localhost imdeemvp]$ I know how to do it in fedora but not in mandrake, thanks! [moved from Networking by spinynorman] Quote Link to comment Share on other sites More sharing options...
aru Posted January 5, 2005 Report Share Posted January 5, 2005 the same file unless fedora does some magic, in ~/.bashrc ie, put these lines in your ~/.bashrc: release=/etc/mandrake-release if [ -f "$release" ]; then myrelease=$(sed -n 's/.*\([0-9]\{2\}.[0-9]\{1\}\).*/mymdk\1/p' "$release") fi PS1="[\u@${myrelease}]\$ " export PS1 unset myrelease release so you'll have what you want even if you upgrade mandrake: [aru@mymdk10.1]$ also if you want the working directory propmted too, then use this PS1 PS1="[\u@${myrelease} \w]\$ " hth Quote Link to comment Share on other sites More sharing options...
mattie Posted January 5, 2005 Report Share Posted January 5, 2005 Hi, I'd like to note that, as a mandrake newbie, I found an easy way to change that through the mandrake configuration utility under networking.. (of course only interesting if you want to give a static name) greets mattie Quote Link to comment Share on other sites More sharing options...
aru Posted January 5, 2005 Report Share Posted January 5, 2005 mattie, despite of what the title of the thread says, imdeemvp doesn't want to change the host name, he just want to change the comand line prompt. But yes, in case you want to change the localhost name one of the ways is that one you said. Quote Link to comment Share on other sites More sharing options...
Qchem Posted January 5, 2005 Report Share Posted January 5, 2005 Of course changing the host name should also change the bash prompt. Just be carefull where you change the host name, I remember on a fedora box simply changing it via the hostname command and this causing loads of problems as it was also looked up in another (probably redhat specific) location. Quote Link to comment Share on other sites More sharing options...
mattie Posted January 5, 2005 Report Share Posted January 5, 2005 mattie, despite of what the title of the thread says, imdeemvp doesn't want to change the host name, he just want to change the comand line prompt. <{POST_SNAPBACK}> oh, I thought he was only mentioning his command line prompt as an example to make his point clear sorry Quote Link to comment Share on other sites More sharing options...
imdeemvp Posted January 8, 2005 Author Report Share Posted January 8, 2005 Ok thanks aru....it now say: [imdeemvp@mymdk10.1]$ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.