Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3939234
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:16:35+00:00 2026-05-20T00:16:35+00:00

I have a cross platform product that gets deployed to several Linux distros and

  • 0

I have a cross platform product that gets deployed to several Linux distros and I’m busy changing one of its startup scripts. Currently the script uses /bin/sh as interpreter. My question is. How safe am I if I change this to /bin/bash, will there be some cases that bash is not installed or something. Why does all the scripts in /etc/init.d use /bin/sh. Are there some stuff that will break when using bash?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:16:35+00:00Added an answer on May 20, 2026 at 12:16 am

    Can I assume bash is installed

    If portability is a goal, you would be doing yourself a disservice to assume bash was installed. That is not to say that bash won’t be installed 99% of the time, but it’s the 1% that gets ya.

    How safe am I if I change this to /bin/bash, will there be some cases that bash is not installed or something

    bash is a POSIX Compliant shell, so unless you need/want to use bash-only syntax, I would not just change the interpreter line to #!/bin/bash on a whim; it buys you nothing with a script that works with #!/bin/sh

    Why does all the scripts in
    /etc/init.d use /bin/sh

    Because they don’t want the system to go down if the admin decides he wants to save hard drive space by deleting bash because his favorite shell is zsh

    Are there some stuff that will break
    when using bash?

    It’s more the other way around. If you have a script with bash-only (non-POSIX) syntax, for example [[ ]] or process substitution <( ), this will break if you change the interpreter from #!/bin/bash to #!/bin/sh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a cross platform program that runs on Windows, Linux and Macintosh. My
All of my cross-platform libraries are created with solutions that have two projects: one
I have some cross platform DNS client code that I use for doing end
Does any one have any experience with those cross-platform mobile apps framework such as
I have the requirements to write a cross platform (win/linux) desktop applications. What database
I have read that its bad idea to use platform default character encoding for
I have spent several hours trying to find a means of writing a cross
I know it is easy to recommend several cross platform libraries. However, are there
I'm looking for a cross-platform database engine that can handle databases up hundreds of
We're developing a cross-platform network application that needs to send and receive data over

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.