小编fee*_*ree的帖子

为什么我不能永久导出变量?

为了永久导出变量,我们可以在以下文件中编写导出命令:

~/.profile
~/.bash_profile
/etc/profile 
Run Code Online (Sandbox Code Playgroud)

在我的情况下, ~/.bash_profile不存在,因此我在其他两个文件中导出变量:

export country=UK
Run Code Online (Sandbox Code Playgroud)

我现在遇到的问题是我定义的变量 ( country) 对于系统来说仍然是未知的。我在想接下来我该怎么做。

command-line

5
推荐指数
1
解决办法
7312
查看次数

标签 统计

command-line ×1