Bash commands not found — $PATH damaged [closed] - macos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I accidentally made a mistake when I changed my ~/.bash_profile file and now I'm unable to run any command, such as ls, touch, sudo, etc.
When I write echo $PATH I have this result:
$ echo $PATH
/usr/local/bin:
$
And when I type /bin/cat ~/.bash_profile, I have this result:
export PATH=$HOME/local/node/bin:/usr/local/bin:$PATH
export PATH=/usr/local/bin:$PATHh
But I am unable to change it. Can someone help me, please?

If you can do /bin/cat, you should be able to /usr/bin/vi, too. Alternately, just fix it in your local shell:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
And then running your favourite editor should work again.

Related

bash: /home/user/.bash_completion/alacritty: No such file or directory [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
whenever I open the terminal this line
bash: /home/user/.bash_completion/alacritty: No such file or directory
is displayed. I tried to install alacritty terminal but it failed and there after I am seeing this line in the terminal. How to solve this problem?
Looking at the install instructions here, you would have done:
echo "source ~/.bash_completion/alacritty" >> ~/.bashrc
So, just edit ~/.bashrc and delete the line source ~/.bash_completion/alacritty.

Bash commands not found in Git bash shell [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I did something wrong with PATH, so currently if I type ls command I get:
bash: ls: command not found
How can I solve it?
Restore $PATH. The easiest way to do this is to close the current shell and open a new one (assuming you didn't futz with the shell startup files and this is why it's broken).

Mac terminal doesn't recognize ll command, only works with ls. How to fix it? Thanks [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
currently I am using my mac terminal for programming. I just want to display the files on terminal but ll does not work. It complained like this
$ -bash:ll:command not found.
Anybody could help me out there? Thanks..
There is no ll command on a vanilla macOS installation. On some Linux distributions ll is an alias to ls.
$ which ll
alias ll='ls -l --color=auto'
/bin/ls

Mac terminal -bash command not found? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm completely new to using terminal, and while trying to use brew to install some stuff, I did something to PATH. Now if I tell it to do something it always returns
-bash: blah: command not found.
Is there any way to reset something to fix this? What should I do?
Your path is usually set in either your .profile or .bashrc file. These are found in the root of your user's home directory.
You should be able to fix them by running these two commands in the terminal. They contain the default executable paths
export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
You can set your path this way:
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
and you can always add other directories if you want. Hope this helps.

MacVim not downloading ./vim file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Im trying to download plugins for my macVim but there is no ./Vim folder? when I download macvim all I get is the application file which works.....am I downloading it from the wrong place?
In Terminal.app, run the following commands to create the ~/.vim directory and the ~/.vimrc file.
$ cd
$ touch .vimrc
$ mkdir .vim
$ open .vim
~/.vim (case sensitive!) you mean? If it dose not exist, just create it.

Resources