ftl1012

PATH:  环境变量,执行ls等非内置命令式,系统会查找对应的路径是否有

export设置临时的环境变量

[root@localhost ~]# touch /tmp/hello
[root@localhost ~]# chmod +x /tmp/hello 
[root@localhost ~]# export PATH="/tmp:$PATH"
[root@localhost ~]# echo $PATH  

image

 

export设置永久的环境变量

编辑文件: vim /etc/profile
变量生效:source /etc/profile  

image

打印环境变量

echo $PATH    (以冒号为分隔符)

image

分类:

技术点:

相关文章:

  • 2018-01-10
  • 2021-11-27
  • 2022-01-07
  • 2021-03-30
  • 2021-11-19
  • 2021-11-28
  • 2021-09-17
猜你喜欢
  • 2021-09-29
  • 2021-12-13
  • 2021-12-15
  • 2021-10-17
  • 2021-09-29
相关资源
相似解决方案