Skip to content

Commit

Permalink
Update index.md (#247)
Browse files Browse the repository at this point in the history
change  `/usr/bin/local` to `/usr/local/bin`
  • Loading branch information
Spike-Leung authored Feb 1, 2023
1 parent 38b2340 commit 9a88a9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/04-shell-scripting/18-shell-script-essentials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ common commands:
...
```

This works because when the shell sees a command, it searches through the folders in the $PATH environment variable to find out where the command is. And the `/usr/bin/local` folder is in this list of paths.
This works because when the shell sees a command, it searches through the folders in the $PATH environment variable to find out where the command is. And the `/usr/local/bin` folder is in this list of paths.

Why do we use the `/usr/bin/local` folder rather than the `/usr/bin` folder? This is just a convention. In general, the `/usr/bin` folder is for commands which are installed with package manager tools like `apt` or Homebrew (on MacOS). The `/usr/local/bin` folder is used for commands which you create for yourself on your local machine and manage yourself[^3].
Why do we use the `/usr/local/bin` folder rather than the `/usr/bin` folder? This is just a convention. In general, the `/usr/bin` folder is for commands which are installed with package manager tools like `apt` or Homebrew (on MacOS). The `/usr/local/bin` folder is used for commands which you create for yourself on your local machine and manage yourself[^3].

## Summary

Expand Down

0 comments on commit 9a88a9c

Please sign in to comment.