<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8" -->

---
title: What’s the Difference Between sh and Bash? | daily.dev
description: Learn about the differences between sh and Bash, the features they offer, and which shell to use.
canonical: https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: What’s the Difference Between sh and Bash? | daily.dev
og:description: Learn about the differences between sh and Bash, the features they offer, and which shell to use.
og:url: https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8
og:image: https://api.daily.dev/og/posts/kzYoKTUd8.png
og:image:alt: What’s the Difference Between sh and Bash?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# What’s the Difference Between sh and Bash?

**[Community Picks](https://daily.dev/sources/community)** · 5 min read · 96 upvotes · 4 comments

## Summary

Learn about the differences between sh and Bash, the features they offer, and which shell to use.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@shalinpatel./whats-the-difference-between-sh-and-bash-f8fa6b2cd9f0>

## Community discussion

Top comments from developers on daily.dev.

**@ghost** · 12 upvotes

> This feels like it was AI ginned up.
> Your shell is stored in $SHELL
>
> Much of the article didn't discuss the actual differences.
> - Arrays
> - Associative arrays
> - Brace expansion
> - Double brackets
> - Process substitution
> - Globbing
> - Regex
> - Bash will make itself /bin/sh compliant (posix) when invoked as `sh`

**@chrollorifat** · 1 upvotes

> i am tired of these AI written slops!

**@zx8086** · 0 upvotes

> Or just learn how to code, you will be better for it

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#shell](https://daily.dev/tags/shell), [#bash](https://daily.dev/tags/bash)

[View this post on daily.dev](https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"What’s the Difference Between sh and Bash?","url":"https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8"},"datePublished":"2024-05-03T12:16:46.716Z","dateModified":"2024-05-09T09:28:18.744Z","description":"Learn about the differences between sh and Bash, the features they offer, and which shell to use.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b4033891c5fc577d6806a62aad542aa1?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b4033891c5fc577d6806a62aad542aa1?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Community Picks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":96},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"linux,shell,bash","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"What’s the Difference Between sh and Bash?"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/what-s-the-difference-between-sh-and-bash--kzyoktud8","comment":[{"@type":"Comment","text":"This feels like it was AI ginned up.\nYour shell is stored in $SHELL\nMuch of the article didn’t discuss the actual differences.\n\nArrays\nAssociative arrays\nBrace expansion\nDouble brackets\nProcess substitution\nGlobbing\nRegex\nBash will make itself /bin/sh compliant (posix) when invoked as sh","datePublished":"2024-05-08T13:52:44.303Z","url":"https://daily.dev/posts/kzYoKTUd8#c-BGIC3e03d","author":{"@type":"Person","name":"Deleted user","url":"https://daily.dev/ghost","image":"https://media.daily.dev/image/upload/s--hNIUzLiO--/f_auto/v1705327420/public/ghost_vlftth"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":12}},{"@type":"Comment","text":"i am tired of these AI written slops!","datePublished":"2025-02-16T10:48:58.993Z","dateModified":"2025-02-17T07:25:45.944Z","url":"https://daily.dev/posts/kzYoKTUd8#c-oOKlzW52e","author":{"@type":"Person","name":"Rifat","url":"https://daily.dev/chrollorifat","image":"https://media.daily.dev/image/upload/s--e_ThGhsG--/f_auto/v1749288761/avatars/avatar_oK8WDAr6bKicmYjiUkFIx?_a=BAMClqUq0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Or just learn how to code, you will be better for it","datePublished":"2024-07-22T00:07:32.190Z","url":"https://daily.dev/posts/kzYoKTUd8#c-YQ3RM7Ctx","author":{"@type":"Person","name":"7-Zark-7","url":"https://daily.dev/zx8086","image":"https://media.daily.dev/image/upload/v1666169239/avatars/avatar_rsfQchPIj.jpg"}}]}
```

