The path value is a series of directories. When you run a program, Linux searches for these directories. Run the following command to view the value of path.
$ Echo $ path
For example, in the host, the path value of your Yogin is:
/Opt/KDE/bin:/usr/local/bin:/usr/x11r6/bin:/home/Yogin/bin
":" Is the separator. Therefore, the above list of directories can be viewed as the following list of directories.
/Opt/KDE/bin
/Usr/local/bin
/Bin:/usr/bin
/Usr/x11r6/bin
/Home/Yogin/bin
Similarly, in the host, the User Root's path value is:
/Opt/KDE/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/x11r6/bin:/root/bin
To modify the PATH value of all users, You can edit the/etc/profile file as root and modify a row containing "Path =.
The new value of path takes effect only after the user registers again. To modify the PATH value of a user, edit the. Bash-profile file in the user's home directory.
If you want to add the current directory to the path, add "." To the path. The path settings are as follows:
Path = "$ path:/usr/x11r6/bin :."
Export path
Note: After you modify the PATH value or any environment variable, you must use export to output it. The new path value will take effect.