PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, May 14, 2022

[FIXED] Where is the dotnet runtime installed to on Ubuntu?

 May 14, 2022     .net-core, cron, ubuntu     No comments   

Issue

I'm trying to use dotnet (.NET Core) with cron jobs, but it seems the path variable for dotnet doesn't exist in the scope of cron. I'd like to add the path to cron, but I need to know where dotnet is actually installed to from a typical Ubuntu installation. Also knowing how to add the path variable to cron would be helpful also, but I think I can figure that out once I have the dotnet installation directory.


Solution

After seeing the comment by Gomes, I checked and it seems both are valid in my system:

$ /usr/bin/dotnet --version
2.1.400
$ /usr/share/dotnet/dotnet --version
2.1.400

I did a bit more research and it appears that the usual way to find this in many unix dialects (as per https://kb.iu.edu/d/acec) is with the help of whereis command:

$ whereis dotnet
dotnet: /usr/bin/dotnet /usr/share/dotnet /usr/share/man/man1/dotnet.1.gz

But with further scrutiny, I could see that /usr/bin/dotnet is just a symlink to /share/dotnet/dotnet:

/usr/bin$ ll dotnet
lrwxrwxrwx 1 root root 22 Jun 29 17:48 dotnet -> ../share/dotnet/dotnet*

And that page also shows how to see which one the operating system uses when running a command you type in the terminal, which command:

$ which dotnet
/usr/bin/dotnet


Answered By - Lairton Ballin
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing