Skip to content
pyllyukko edited this page Feb 20, 2025 · 2 revisions

PATH is set in so many different places, so this is just a "note to self" type of page.

$ command -p getconf PATH
/bin:/usr/bin

📖 Sudo Mastery, 2nd Edition (for sudoers):

Defaults secure_path=”/bin /usr/bin /sbin /usr/sbin”

ansible -m setup against Raspberry Pi OS:

"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/games"

https://github.com/shadow-maint/shadow/blob/77eb67d4a83600febf326b4551949ce5e71e5a34/etc/login.defs#L157-L162:

#
# *REQUIRED*  The default PATH settings, for superuser and normal users.
#
# (they are minimal, add the rest in the shell startup files)
ENV_SUPATH  PATH=/sbin:/bin:/usr/sbin:/usr/bin
ENV_PATH    PATH=/bin:/usr/bin

Bash

BASH(1):

A common value is ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''.

Bash's builtin PATH:

Clone this wiki locally