~$ dotnet command not found issue
Problem encountered on https://dotnet.microsoft.com/learn/aspnet/hello-world-tutorial/install Operating System: macos
Provide details about the problem you are experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.
after downloading .NET SDK I attempted to run it in a new Terminal window. The following showed after attempting to run the command ~$ dotnet " zsh: command not found: ~$ "
Any help would be greatly appreciated
It sounds like you're typing ~$ into your terminal. You aren't meant to do that, just run dotnet. 🙂
~$ is just shorthand for the prompt you should see in your actual terminal. You can also use the Copy button or select the text and see that ~$ isn't included.
@dagood with running just dotnet if it is not recognized I assume it wasn't installed correctly?
It's possible you're also running into this issue, then: https://github.com/dotnet/core-setup/issues/6521
I'm running Ubuntu 18.04.2. I receive the error message "Command 'dotnet' not found, but can be installed with: sudo snap install dotnet-sdk"
I run "sudo snap install dotnet-sdk" successfully. I restart the server I then run "dotnet web" and it fails with the same message.
I run "whereis dotnet". I get the message: "dotnet: /usr/local/bin/dotnet" I run "sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/" and receive the error message: "ln: failed to create symbolic link '/usr/local/bin/dotnet': File exists"
Have no idea how to fix this. need help.
Ubuntu 18.04 doesn't work the same as macOS--this is not directly related.
'/usr/local/bin/dotnet': File exists
That suggests that you do have .NET Core installed correctly, but your PATH environment variable is incorrectly configured. If you run echo $PATH, you should see a string that contains /usr/local/bin.
If your PATH variable doesn't have /usr/local/bin, one potential reason for this is bad shell configuration. (.bash_profile, .bashrc, .profile, etc.) Look at this script and make sure PATH isn't cleared out. For example, PATH=/home/user/foo clears it out, PATH=$PATH:/home/user/foo appends to it and is ok.
Please file a new issue if you need more help, since it's a unique situation.
Closing due to lack of activity; please reopen if you still need help.