Reputation: 245
I am on Windows 10v1803, and i have WSL with Ubuntu installed and working well.
Recently, i was in vim
, and appending some aliases to my .bashrc
. After I finished editing, I wanted to exit without saving, did the usual Control-C, and instead of :q!
I did !:q
(Yes, silly typos). I realized my mistake, did the correct :q!
and exited.
I came back ~1hr later, to make those 2 changes (below) and noticed that on startup, I got the error
-bash: /bin/bash:: No such file or directory
along with the normal startup
suda@suda:~$
Everything proceeds normally, but i'm concerned as to what that error means. And, there is nothing that I could find on this apart from reinstall bash, which i have done 5 times, and makes no difference.
I proceeded to add the 2 aliases to my .bashrc
, and everything works fine...
Some help as to what is happening here please?
And if you're wondering, these were what i was adding onto my .bashrc
:
alias cls="clear"
alias md="mkdir"
Also, I feel that this won't go under askubuntu
. If i'm wrong, please do tell me.
Upvotes: 1
Views: 11845
Reputation: 198388
The error message is:
-bash: <file>: No such file or directory
Check that your script doesn't start with
#!/bin/bash:
and that you do not invoke /bin/bash:
elsewhere, either.
(because, indeed, bash:
should not exist in /bin
)
Upvotes: 4