Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
6 times
I have this issue with bash on a MacBook Pro (chip M1, OS: 12.5.1). It’s been there since day1.
-
I create and modify a new bash_profile file in my ~ folder using vi so I can exclude line-ending issues, formatting issues due to the editor, and such
-
Most of the commands I write in the .bash_profile file do not work. For example,
echo
seems to work;source
returns “No such file or directory” even when the file actually exists and the path is correct;ls
and many others give “Command not found”. All those commands run in the terminal with no problems at all -
the $PATH variable seems okay.
export
doesn’t return an error message. Without appending new paths inbash_profile
, I have/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin
, which is what I expect looking into/etc/paths.d/
-
for example, the line
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
tobash_profile
doesn’t produce any error when sourcing the file; the linesource "/Volumes/Macintosh HD/Applications/root_v6.26.06/bin/thisroot.sh"
(file, path verified) givesNo such file or directory
-
the
/etc/paths
file is still untouched:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
-
probably part of the same problem, the terminal overwrites the lines that are longer than the window length
-
among the attempts to solve the problem, I updated bash to a more recent version, 5.1.0;
bash --version
responds accordingly. Same errors. -
the issue was there with previous OS versions as well. Updating didn’t help
Hopefully, someone who ran into the same issues can share some good hints. Thanks!
matt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You must log in to answer this question.
Browse other questions tagged .
lang-bash