0% found this document useful (0 votes)
32 views1 page

The PATH Environment Variable

The PATH environment variable that determines executable file locations is commonly set in Linux in the /etc/environment, /etc/profile, and /etc/profile.d/ files for all users, and in the ~/.bashrc file for individual users. System-wide configuration files like /etc/environment and /etc/profile should be modified carefully as changes affect all users, while user-specific files like ~/.bashrc are safer to edit for a single user.

Uploaded by

Roshan Jangir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

The PATH Environment Variable

The PATH environment variable that determines executable file locations is commonly set in Linux in the /etc/environment, /etc/profile, and /etc/profile.d/ files for all users, and in the ~/.bashrc file for individual users. System-wide configuration files like /etc/environment and /etc/profile should be modified carefully as changes affect all users, while user-specific files like ~/.bashrc are safer to edit for a single user.

Uploaded by

Roshan Jangir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

The PATH environment variable is usually set in one or more configuration files in

the Linux operating system, depending on the system and distribution. Here are some
common places where the PATH variable is set:

/etc/environment: This file contains system-wide environment variables, including


the PATH variable. This file is read by the PAM (Pluggable Authentication Modules)
system at login and is available to all users.

/etc/profile: This file is executed by the Bash shell for login shells and is used
to set system-wide environment variables and shell settings. It may contain a line
like PATH=$PATH:/my/new/directory to add a directory to the PATH variable.

/etc/profile.d/: This directory contains shell scripts that are executed by the
Bash shell for login shells. These scripts can be used to set environment variables
and shell settings for all users or specific user groups.

~/.bashrc: This file is executed by the Bash shell for interactive non-login shells
and is used to set user-specific environment variables and shell settings. It may
contain a line like PATH=$PATH:/my/new/directory to add a directory to the PATH
variable for the current user only.

Note that modifying system-wide configuration files should be done with caution, as
it can affect all users on the system. It's generally recommended to modify user-
specific configuration files such as ~/.bashrc for individual users.

You might also like