您的位置:首页 > 其它

6: The PATH Variable(Working with programs)

2016-09-14 00:00 337 查看
In the last screen, we typed
/usr/bin/python
to access the Python interpreter. If the Python interpreter is at that location, how come we can also access it by typing
python
? We can do this because of the
PATH
variable. The
PATH
environment variable contains several folders. Any program in any one of these folders can be run simply by typing the name of the program. Since
/usr/bin
is one of the folders in
PATH
, we can access
python
, which is in the folder, by just typing
python
instead of the full path.

Instructions

Type
echo $PATH
to see what folders are in
PATH
.

/home/dq$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐