I am a beginner using kali linux and I am attempting to change my PS1 enviornment variable and the text I put in is stuck on screen despite pressing CTRL+C and CTRL+D is not acting normally and it's closing the terminal.
exit
command (5 characters including the enter key vs 2 characters pressed at once (ctrl+d) - it’s a no brainer!)You can't assign just any garbled text toI am a beginner using kali linux and I am attempting to change my PS1 enviornment variable and the text I put in is stuck on screen despite pressing CTRL+C and CTRL+D is not acting normally and it's closing the terminal.View attachment 19755
PS1
variable and expect it to work.Yes, to make a prompt that includes some information like the user's name and the hostname, it's the formatting for PS that will achieve that. Not thinking that you were referencing alternatives, it's nevertheless quite possible to have the shell working with any number of creative turns without the formatting, however uninformative it is:You can't assign just any garbled text toPS1
variable and expect it to work.
That variable is expecting text that formats the prompt.
[tom@min ~]$ ls
file1 file2 file3 file4
[tom@min ~]$ PS1="funnyFace:-) "
funnyFace:-) ls
file1 file2 file3 file4
funnyFace:-) PS1="\[\e[32;1m\][\u@\h \w]$ \[\e[0m\]"
[tom@min ~]$ ls
file1 file2 file3 file4
[tom@min ~]$
You're right, I just tested OP's sample in Kali and it works in my case, not sure what the problem is:Yes, to make a prompt that includes some information like the user's name and the hostname, it's the formatting for PS that will achieve that. Not thinking that you were referencing alternatives, it's nevertheless quite possible to have the shell working with any number of creative turns without the formatting, however uninformative it is: