~/.bashrc on the other hand, is read every time you open a terminal so that is not where you want to set your $PATH since you only need to set it once and don't need to have it reset every time you open a terminal. ~/.profile is read by all shells, not just bash and it is read once when you log in. To summarize, to add a specific directory to you user's $PATH without changing the system-wide settings, add this line to your $HOME/.profile file: PATH="$PATH:/usr/bin" There may be other apps that aren't available that should be, but that is. I tried to use gedit, but when I type it in the terminal, I get this: bash: gedit: command not found. See very good answer here on the different files read by different shell invocations. I just installed and started using Manjaro 16.06.01 KDE (have been using Mint for a few months, but wanted to try something else). Which one is read depends on how you are launching bash, if it is being run as an interactive or non-interactive shell and if it is a login shell or not. You then have the various user-specific bash startup files. Normally, /usr/bin should be added to the system $PATH in /etc/profile, for example, on my Debian, I have: PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" Every new user inherits the $PATH that is set up there. First, there is the system wide $PATH which is set up in /etc/profile. Since you seem to be using bash, read on. This list is called your path and in the bash shell (and most other *nix shells), it is saved in the $PATH variable. When you issue a command name in the terminal, the system will look for an executable of that name in a list of directories where it is supposed to find such executables.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |