'dfx' is not a recognized command. $PATH help

Hello I am a real novice at Lunux. Can you please tell me:

  1. What directory is dfx install to by default?
  2. How can I add this location to my $PATH variable on linux 20.04? I am running on a Windows 10 laptop using the Ubuntu virtual machine app. Is this a mistake? Should I just buy a Mac?
  3. My $PATH is currently HUGE, on Windows. What is the limit to how many characters your path can be? Is there a GUI tool to manage the paths in your $PATH variable, and please God I want it to be a permanent change, surviving power cycles, and available to every user.

Also, please talk to me like Iā€™m 6. I have still not quite rapped my head around what the ~ and the < or << or | mean in linux command lines. DO NOT assume that I know.

1 Like

First, try restarting the Linux virtual machine (or the whole Windows machine if you prefer) and see if it finds dfx afterward.

If not:

The dfx binary is installed in a bin folder in your user directory, ~ is a shortcut for this directory, to change directory then list its contents:

cd ~/bin/
ls

dfx should be in there.

Your PATH in Linux should already include this bin directory. Just check this first, run this command and look for /home/<your_username>/bin in the output:

echo $PATH

3 Likes