bash换成zsh环境变量_如何在bash和zsh中设置环境变量

在Bash和zsh中设置环境变量的方法基本相同,主要区别在于持久化环境变量时需使用不同的命令。在Bash中使用 ,在zsh中使用 。通过输入 检查设置是否成功。修改配置文件后,使用 .bashrc 或 .zshrc 来应用到当前shell。
摘要由CSDN通过智能技术生成

bash换成zsh环境变量

The operation is the same on both Bash and zsh, with the caveat that to persist them you need to use .bashrc and .zshrc, respectively.

Bashzsh上的操作相同,但需要注意的是,要保留它们,您需要分别使用.bashrc.zshrc

Setting them in the shell is the same:

将它们设置在外壳中是相同的:

$ export VARIABLE=something

To make sure it was set, type

要确保已设置,请键入

$ $VARIABLE

If you edit a dot file, to apply the changes to the current shell use source .dotfile.

如果编辑点文件, source .dotfile使用sou

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值