Making sure to always run the dnvm and dnu commands by adding to .bash_profile

263 Views Asked by At

I was following along Installing ASP.NET 5 and DNX post and here I'm stuck:

Tip: Add the following to your .bash_profile and restart the Terminal. The first line will ensure that you can always run the dnvm and dnu commands. The second line works around a known bug in Mono where you may see the IOException FileSystemWatcher has reached the maximum number of files to watch when running your application.

source dnvm.sh
export MONO_MANAGED_WATCHER=disabled

My simple question is:

  • How to add it to .bash_profile?
1

There are 1 best solutions below

1
On BEST ANSWER

.bash_profile is a file that sits at ~/. You should be able to open it with a text editor and add those commands.

Alternatively you can do this in your terminal.

echo 'source dnvm.sh' >> ~/.bash_profile
echo 'export MONO_MANAGED_WATCHER=disabled' >> ~/.bash_profile

Whats happening here is you are appending a piece of text 'source dnvm.sh' into a specific file.

The echo command prints the text, and the >> shift operator appends the text to the file which is .bash_profile located at ~/.