How to use bash shell in ADS terminal ?

Susja 716 Reputation points
2023-08-08T15:53:37.23+00:00

Hello,

I am used to work in bash shell but lately I was working on Windows .. hence my choice was Cygwin.

Now I am using ADS and want to utilize Terminal option.

I have Cygwin installed on my Desktop hence I could invoke executables from it but my point is ... that someone said that ASD Terminal could be changed to bash shell.

My expectation is that I should be able simply run from terminal Powershell prompt command >bash and it would switch to bash shell.

Is it correct?

Thanks

Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
100 questions
{count} votes

Accepted answer
  1. Oury Ba-MSFT 16,886 Reputation points Microsoft Employee
    2023-08-10T21:01:09.91+00:00

    @Susja Thank you for letting me know.

    I was able to get this working from my end.

    I have first installed the bash from this link https://git-scm.com/download/win

    Using winget tool

    Install winget tool if you don't already have it, then type this command in command prompt or Powershell.
    winget install --id Git.Git -e --source winget

    Then after the bash was install in ADS see image below. I type ls and I was able to get it run.

    Could you please try the same steps.

    User's image

    Please comment below if it does not work for you. We can continue to work on the same.

    Regards,

    Oury

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Susja 716 Reputation points
    2023-08-10T23:17:27.2866667+00:00

    @Oury Ba-MSFT

    Thanks so much.

    I followed your steps and now it works for me.

    I noticed that now I have Git Bash option to select for Terminal.

    By default it opens Power Shell. It would be more convenient if it would open default in bash.

    Hence I've changed Settings for Terminal:

    User's image

    But it didn't have effect and opened again by default in Power Shell.

    It's not a big deal as I could change it easy now ... but do you have a clue why it didn't take my Settings?

    Thanks again


  2. Erin Stellato 486 Reputation points Microsoft Employee
    2023-08-11T22:09:38.23+00:00

    @Susja You can edit the default shell in the settings.json file (Ctrl/CMD + Shift P > Preferences: Open User Settings (JSON)), specific settings listed here: https://learn.microsoft.com/en-us/sql/azure-data-studio/integrated-terminal?view=sql-server-ver16#configuration