Windows10永久修改环境变量PATH图文详解

PATH这个环境变量在Linux和Windows中作用是一样的,都是用于规定系统命令查找路径。通常在新安装了软件后会将二进制可执行文件目录加入PATH中,或者拷贝到已存在于PATH的某个目录中,这样命令就可以不需要完整路径去执行。这一节我们来看看Windows中怎么永久修改PATH。

我是T型人小付,一位坚持终身学习的互联网从业者。喜欢我的博客欢迎在csdn上关注我,如果有问题欢迎在底下的评论区交流,谢谢。

  • 在控制面板进入System and Security
    1-control.png

  • 进入System
    2-system.png

  • 进入Advanced system settings
    3-advanced.png

  • 进入Environment Variables设置环境变量
    4-environment.png

  • 编辑Path
    这里有上下两个Path,上面的是给本用户的,下面的是系统的
    5-path.png

  • 新建或者编辑
    6-new.png

  • 成功添加,保存退出
    7-k8s.png

  • 验证
    我在添加的目录里面有刚下载的kubectl.exe文件,直接打开CMD运行下看看

C:\Users\Admin>kubectl --help
kubectl controls the Kubernetes cluster manager.

 Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/

Basic Commands (Beginner):
  create         Create a resource from a file or from stdin.
  expose         Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
  run            Run a particular image on the cluster
  set            Set specific features on objects

Basic Commands (Intermediate):
  explain        Documentation of resources
  get            Display one or many resources
  edit           Edit a resource on the server
  delete         Delete resources by filenames, stdin, resources and names, or by resources and label selector
...
...

能直接运行,修改成功。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值