SH Dash bash for Debian and Ubuntu

Source: Internet
Author: User

Ubuntu and Debian's shell are installed by default to dash, not bash.
Run the following command to view the details of SH and confirm which program the shell corresponds to:
$ls-al/bin/sh

Dash is lighter and faster than bash. But bash is more common.
If some commands, scripts, and so on are not always executed properly, it may be the cause of dash.
For example, when compiling the Android source code, if you use dash, it is possible to compile an error, or the compiled system will not start.

The shell can be switched back to bash in the following ways:
$sudo dpkg-reconfigure Dash
Then select No or no, and confirm.
Doing so will reconfigure dash and make it not the default shell tool.

You can also directly modify the/bin/sh link file and assign it to/bin/bash:
$sudo ln-fs/bin/bash/bin/sh

Another workaround is to specify the shell to be used directly in the script file, instead of specifying SH:
For example, use #!/bin/bash or #!/bin/dash instead of #!/bin/sh.
However, this will lose the versatility of the script so that it cannot be executed under a system that does not have the script specified.

SH Dash bash for Debian and Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.