课程: Linux Tips

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Exploring the PATH variable

Exploring the PATH variable - Linux教程

课程: Linux Tips

Exploring the PATH variable

- [Narrator] The PATH environment variable contains a list of directories a shell will search to find the name of a program typed at the command line. On a Linux system, tools we use are commonly located in various directories and remembering where each of them lives can be tedious. The PATH variable can be set system-wide in a global shell configuration and can also be set or modified by user shell configurations, and because this varies by shell and even by the type of shell, in this episode I'll focus on setting PATH for an interactive Bash shell. PATH can also be set for non-interactive shells and for graphical shells. First, let's take a look at PATH with echo PATH. Here, I can see the directories already included in the variable which will be read from left to right. So if you type a command then there's a program that matches that in both bin and sbin for example, the one in sbin will run and the one in bin will…

内容