I tried below command
echo PS1=“[\d]\u@\h:\w$” >> ~/.profile
or
vi ~/.profile
PS!=“[\d]\u@\h:\w$”
esc+wq
but still its giving error
I tried below command
echo PS1=“[\d]\u@\h:\w$” >> ~/.profile
or
vi ~/.profile
PS!=“[\d]\u@\h:\w$”
esc+wq
but still its giving error
I tried your string, and it has a subtle error: look very closely at the first quote mark. It’s a
U+201C LEFT DOUBLE QUOTATION MARK
rather than a normal
0x22 QUOTATION MARK
This is why it isn’t working, I think. If I correct that first quotation mark, then PS1 works as expected:
[Sat Dec 09]robk@Robs-MBP:~/projects/kodekloud-udemy$