Terminal is not sourcing .bashrc anymore #7660

Closed
opened 2026-01-31 01:09:45 +00:00 by claunia · 6 comments
Owner

Originally created by @JetUni on GitHub (Apr 24, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.207]
Windows Terminal version (if applicable): 0.11.1121.0

Steps to reproduce

  1. Open Terminal
  2. Open a new tab using Ubuntu
  3. The .bashrc file has not been sourced

Expected behavior

The .bashrc file should have been sourced

Actual behavior

It is not being sourced

Here is my settings.json


// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation

{
    "$schema": "https://aka.ms/terminal-profiles-schema",

    "defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",

    "profiles":
    {
        "defaults":
        {
            // Put settings here that you want to apply to all profiles
        },
        "list":
        [
            {
                // Make changes here to the powershell.exe profile
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                // Make changes here to the cmd.exe profile
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
                "hidden": false,
                "name": "Ubuntu-18.04",
                "source": "Windows.Terminal.Wsl",
                "startingDirectory": "//wsl$/Ubuntu-18.04/home/jet/sites",
                "closeOnExit": true
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ]
    },

    // Add custom color schemes to this array
    "schemes": [],

    // Add any keybinding overrides to this array.
    // To unbind a default keybinding, set the command to "unbound"
    "keybindings": [
        { "command": "duplicateTab", "keys": ["ctrl+t"] }
    ]
}

Originally created by @JetUni on GitHub (Apr 24, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.207] Windows Terminal version (if applicable): 0.11.1121.0 ``` # Steps to reproduce 1. Open Terminal 2. Open a new tab using Ubuntu 3. The .bashrc file has not been sourced # Expected behavior The .bashrc file should have been sourced # Actual behavior It is not being sourced Here is my settings.json ``` js // To view the default settings, hold "alt" while clicking on the "Settings" button. // For documentation on these settings, see: https://aka.ms/terminal-documentation { "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "profiles": { "defaults": { // Put settings here that you want to apply to all profiles }, "list": [ { // Make changes here to the powershell.exe profile "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "name": "Windows PowerShell", "commandline": "powershell.exe", "hidden": false }, { // Make changes here to the cmd.exe profile "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "name": "cmd", "commandline": "cmd.exe", "hidden": false }, { "guid": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}", "hidden": false, "name": "Ubuntu-18.04", "source": "Windows.Terminal.Wsl", "startingDirectory": "//wsl$/Ubuntu-18.04/home/jet/sites", "closeOnExit": true }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" } ] }, // Add custom color schemes to this array "schemes": [], // Add any keybinding overrides to this array. // To unbind a default keybinding, set the command to "unbound" "keybindings": [ { "command": "duplicateTab", "keys": ["ctrl+t"] } ] } ```
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 01:09:45 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 24, 2020):

Terminal does not control whether bashrc is sourced.

@DHowett-MSFT commented on GitHub (Apr 24, 2020): Terminal does not control whether bashrc is sourced.
Author
Owner

@JetUni commented on GitHub (Apr 24, 2020):

What is going wrong then? Yesterday it was working, now it's not...

@JetUni commented on GitHub (Apr 24, 2020): What is going wrong then? Yesterday it was working, now it's not...
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 25, 2020):

So, .bashrc is somewhat complicated and it might not always be sourced. It depends on how your shell's configured and even what other files you have on disk.

@DHowett-MSFT commented on GitHub (Apr 25, 2020): So, `.bashrc` is somewhat complicated and it might not always be sourced. It depends on how your shell's configured and even what other files you have on disk. ![](http://s0.cyberciti.org/uploads/cms/2015/01/BashStartupfiles.jpg)
Author
Owner

@JetUni commented on GitHub (Apr 27, 2020):

Thanks! I'll look into it

@JetUni commented on GitHub (Apr 27, 2020): Thanks! I'll look into it
Author
Owner

@neoadventist commented on GitHub (May 15, 2020):

Did you find anything @JetUni ?

@neoadventist commented on GitHub (May 15, 2020): Did you find anything @JetUni ?
Author
Owner

@JetUni commented on GitHub (May 15, 2020):

Yes, I believe it happened when I copied over a file from Windows that I didn't expect to be there

@JetUni commented on GitHub (May 15, 2020): Yes, I believe it happened when I copied over a file from Windows that I didn't expect to be there
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7660