You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

/Users/Sandeep/.zshrc:4: no such file or directory: username

Terminal is throwing me an error every time I open it. I recently had an issue with losing system files while discarding git commit in VS code and having all kinds of issues.

Here's what my terminal and zshrc profile looks like -

Terminal -


Zshrc -

MacBook Pro (2021)

Posted on Aug 10, 2023 1:25 AM

Reply
Question marked as Top-ranking reply

Posted on Aug 10, 2023 2:59 AM

Fix the following:


export M2_HOME=/Users/<username>/Downloads/apache-maven-3.6.3


with:


export M2_HOME="/Users/$USER/Downloads/apache-maven-3.6.3"


You can use $USER, $USERNAME, or sandeep interchangeably in that correction.


Take a closer look at the redundancy in your subsequent export statements.

Similar questions

2 replies
Question marked as Top-ranking reply

Aug 10, 2023 2:59 AM in response to Sandeep_Ray

Fix the following:


export M2_HOME=/Users/<username>/Downloads/apache-maven-3.6.3


with:


export M2_HOME="/Users/$USER/Downloads/apache-maven-3.6.3"


You can use $USER, $USERNAME, or sandeep interchangeably in that correction.


Take a closer look at the redundancy in your subsequent export statements.

/Users/Sandeep/.zshrc:4: no such file or directory: username

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.