![]() |
bash prompt
How do i (or can i) change the shell prompt to display only the last directory im in and not the whole path on he BU server? ???:(
|
Re: bash prompt
.bashrc file in your user directory or globally in /etc/bashrc
it would look about like this: Code:
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ " [user@host cwd]# cwd = current working directory ie if your in /var/www/html it would show just html |
Re: bash prompt
generally speaking, type:
set | grep PS1 that will give you the variable that determines the shape of your login prompt. If you know Doskey (ah, the good ole times ;)) that should sound familiar. Anyway, play around and ask mr. google, you'll soon for sure find out what you need to change. Then just put it in your .bashrc in your home dir like BAStumm says. |
Re: bash prompt
Thanks guys.
Copy paste from BAStumm's post worked just fine :D |
Re: bash prompt
|
All times are GMT +2. The time now is 08:51. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.