PATH: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=
* [[Bash Built-In Variables#PATH|Bash Built-In Variables]]
* [[Bash Built-In Variables#PATH|Bash Built-In Variables]]
* [[Bash_Configuration_Files#Overview|bash Configuration Files]]
=Overview=
=Overview=
When given a command, the shell automatically does a hash table search for the executable on the directories listed in the <code>PATH</code> environment variable. The directories should be separated by colons in the list.
When given a command, the shell automatically does a hash table search for the executable on the directories listed in the <code>PATH</code> environment variable. The directories should be separated by colons in the list. The conventional places to set <code>PATH</code> value is in <code>[[/etc/profile#Overview|/etc/profile]]</code> and <code>[[.bashrc|~/.bashrc]]</code>. On Macs, the value of the PATH variable is built from the content of <code>/etc/paths</code> and <code>/etc/paths.d</code>. For more details see: {{Internal|Mac PATH#Overview|PATH on Mac}}
 
=Setting Configuration for All Users, Including root=
The conventional places to set <code>PATH</code> value is in <code>[[/etc/profile#Overview|/etc/profile]]</code> and <code>[[.bashrc|~/.bashrc]]</code>.  
{{Internal|Bash_Configuration_Files#Setting_Configuration_for_all_Users.2C_Including_root|Setting Configuration for All Users, Including root}}
 
On Macs, the value of the PATH variable is built from the content of <code>/etc/paths</code> and <code>/etc/paths.d</code>. For more details see: {{Internal|Mac PATH#Overview|PATH on Mac}}
 
=Organizatorium=

Latest revision as of 06:33, 4 May 2022

Internal

Overview

When given a command, the shell automatically does a hash table search for the executable on the directories listed in the PATH environment variable. The directories should be separated by colons in the list. The conventional places to set PATH value is in /etc/profile and ~/.bashrc. On Macs, the value of the PATH variable is built from the content of /etc/paths and /etc/paths.d. For more details see:

PATH on Mac

Setting Configuration for All Users, Including root

Setting Configuration for All Users, Including root