---
title: "Discussion on \"bash的环境变量和shell变量\" | Hashnode"
description: "Discussion on \"bash的环境变量和shell变量\". 本文简单介绍了bash的启动过程；shell变量和环境变量的区别及相互转换；环境变量传递给子进程的过程；在当前环境下执行脚本及其实际应用\n1. 导言\n\nshell 是一个 Linux 的命令行解释器，Linux 下有很多 shell，其中 ubuntu 中默认的 shell 应该是 dash，因为我们看到 /bin/sh 被链接到了 dash\n\n图1：/bin/sh指向dash\n\n但是当你启动终端时(不管是在桌面还是远程)，默认启动的却是 bash(Bourne-Again SHell)，bas..."
url: "https://hashnode.com/posts/100001-environment-variables-and-shell-variables/63d1fd636d92a85e38fcc93e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [bash的环境变量和shell变量](https://whowin.cn/100001-environment-variables-and-shell-variables?utm_source=hashnode&utm_medium=feed)

本文简单介绍了bash的启动过程；shell变量和环境变量的区别及相互转换；环境变量传递给子进程的过程；在当前环境下执行脚本及其实际应用 1. 导言 shell 是一个 Linux 的命令行解释器，Linux 下有很多 shell，其中 ubuntu 中默认的 shell 应该是 dash，因为我们看到 /bin/sh 被链接到了 dash 图1：/bin/sh指向dash 但是当你启动终端时(不管是在桌面还是远程)，默认启动的却是 bash(Bourne-Again SHell)，bas...

Apr 10, 2022 · 5 min read · whowin.cn  
Updated Oct 14, 2024  
Read the article

-   [#shell](https://hashnode.com/tag/shell)
-   [#bash](https://hashnode.com/tag/bash)
-   [#546v5akd5yy6yep](https://hashnode.com/tag/546v5akd5yy6yep)

## Written by

[whowin](https://hashnode.com/@whowin)

@whowin · Beijing, China

  
[View profile](https://hashnode.com/@whowin)

一枚有30多年经验的退休程序员，主要从事嵌入式软件开发

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
