Currently working on the “Lingua Franca - An Offline Project”. I am having a hard time getting through this mainly because my Terminal looks so different from Codecademy’s.
The computer I am working on is a MacBook Air which was the latest model when I bought it last Christmas (2021).
Instead of the dollar sign ($) PS1 environment variable, mine is a very long string that looks like the below … [email protected] ~ %
Can someone confirm that I have activated the correct Terminal (aka file system)?
What OS do you have? I’m assuming it’s the later than Catalina?
So then your default shell is zsh and not bash. (If you have an OS before Catalina, the default shell is bash).
You’d need to use a text editor like nano and change the prompt in your config file (.zshrc file)
Type this command:
nano ~/.zshrc
Now you’re in the config file, type:
PS1="whatever you want the prompt to say goes here"
Then CTRL +X and the “Y” which will save the changes.
Open a new terminal window and your prompt will reflect the changes that you made.
Thanks for your reply lisalisaj! I hadn’t known to use nano~/.zshrc before reading your response and was able to call up the bash profile using the same nano ~/.bash_profile that I learned from the Command Line course. But you are right that changing the PS1 environment variable cleaned up the super long string that kept coming up in my terminal. And yes my shell is zsh … that’s what I see at the very top of my Terminal box.
There is a way to change your default prompt to bash from zsh if you want to do so. I wouldn’t do that, but it depends on what one’s preference is.
You can check the Terminal docs I listed above for that info.
There is also some open source framework code called “Oh My zsh” which helps one manage their zsh configuration. Might be worth checking out as well if you’re interested.