Showing posts with label MacOS. Show all posts
Showing posts with label MacOS. Show all posts

How to install .Net core SDK in Mac OS ?

 Hello Everyone,

As the official website not having full instructions,I am writing this article about installing .Net code SDK in Mac OS.

Step1: As usual, go to microsfot website https://dotnet.microsoft.com/download and choose what version of .Net SDK you want. Download and install it. 

As per the installation guide in the webpage, you have to execute in the terminal `dotnet` you will expect to output similar to this

PS az204_prep> dotnet


Usage: dotnet [options]
Usage: dotnet [path-to-application]
Options:
-h|--help Display help.
--info Display .NET Core information.
--list-sdks Display the installed SDKs.
--list-runtimes Display the installed runtimes.
path-to-application:
The path to an application .dll file to execute.
PS az204_prep>

But instead that you will get

zsh: command not found: dotnet

To resolve this error verify you can find dotnet binary in /usr/local/share/ location with ls.

✘  ~  ls /usr/local/share/dotnet/dotnet
/usr/local/share/dotnet/dotnet

Then simplay either add to your shell PATH with export command and source your shell file.

 
 
export PATH="$PATH:/usr/local/share/dotnet/dotnet"
 

Or create a soft link into /usr/loca/bin directory

 
  ~  ls /usr/local/share/dotnet/dotnet
/usr/local/share/dotnet/dotnet
 

Hope it helps you.

Thank you.


 

How to launch Sublime text editor from terminal in Macbook ?

As you all know, Sublime is one of the famous and lite weight text editor and can be used for application development for almost every programming language available today.
For VS Code to launch editor from terminal, you can use code from terminal.
But for Sublime there is no direct method. To achieve this in sublime we can achieve it in 2 methods I believe. Lets see one by one

Using Soft Link

After creating soft link just type sublime in your terminal and sublime open.
  
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime

Using alias

Add alias like below in your .bashrc or ~/.bash_profile files

subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'

then do load the changes with source

source ~/.bashrc

Hope this helps.
Thanks
Raja

MacOS: Could not read files copied from external drive to your Mac

While you have successfully copied the data from your external devices particularly from NTFS file system to your MacOS's file system (APFS), you still would need to struggle to access those files later for some reason. Or in certain cases being a super user you may be able to access those files, but not your applications.

Here the three simple steps to fix the issue.

Prerequisite:

Step 1: Install the XCode command line tools.

$ xcode-select --install

Actual commands that fixes the issue:

Step 2: Get the file information like file type, creator, and other file attributes etc. and verify.

GetFileInfo <path to file>
Example: GetFileInfo /Users/venkat/backups/VMDiskFile.vmdk


Step:3 Change it's file permissions by executing

SetFile -c "" -t "" <path to file>
Example: SetFile -c "" -t "" /Users/venkat/backups/VMDiskFile.vmdk

Your file is now accessible by all. Of course you may choose set of permissions as per the requirement. The above command just lifts all the restrictions on the file.