How to set your default linux distribution on windows 10

It appears like nothing was discovered at this location. Possibly attempt a search?

Join with us

Right here you may subscribe to our channels. We now have Twittеr, YouTube, and Telegram, together with an RSS feed and E-mail publication.

We discontinued Fb to ship our put up updates.

Featured posts

Commercial

Not too long ago up to date

Pleasant Blogs

We use cookies on our web site to provide the most related expertise by remembering your preferences and repeat visits. By clicking “Settle for”, you consent to using ALL the cookies. Learn Extra

Privateness Overview

This web site makes use of cookies to enhance your expertise whilst you navigate via the web site. Out of those cookies, the cookies which can be categorized as needed are saved on your browser as they’re important for the working of fundamental functionalities of the web site. We additionally use third-party cookies that assist us analyze and perceive how you employ this web site. These cookies shall be saved in your browser solely with your consent. You even have the choice to opt-out of those cookies. However opting out of a few of these cookies could have an impact on your shopping expertise.

Essential cookies are completely important for the web site to perform correctly. This class solely contains cookies that ensures fundamental functionalities and security measures of the web site. These cookies don’t retailer any private data.

Any cookies that will not be significantly needed for the web site to perform and is used particularly to gather consumer private knowledge through analytics, advertisements, different embedded contents are termed as non-necessary cookies. It’s obligatory to procure consumer consent prior to operating these cookies on your web site.

It appears like nothing was discovered at this location. Possibly attempt a search?

Join with us

Right here you may subscribe to our channels. We now have Twittеr, YouTube, and Telegram, together with an RSS feed and E-mail publication.

We discontinued Fb to ship our put up updates.

Featured posts

Commercial

Not too long ago up to date

Pleasant Blogs

We use cookies on our web site to provide the most related expertise by remembering your preferences and repeat visits. By clicking “Settle for”, you consent to using ALL the cookies. Learn Extra

Privateness Overview

This web site makes use of cookies to enhance your expertise whilst you navigate via the web site. Out of those cookies, the cookies which can be categorized as needed are saved on your browser as they’re important for the working of fundamental functionalities of the web site. We additionally use third-party cookies that assist us analyze and perceive how you employ this web site. These cookies shall be saved in your browser solely with your consent. You even have the choice to opt-out of those cookies. However opting out of a few of these cookies could have an impact on your shopping expertise.

Essential cookies are completely important for the web site to perform correctly. This class solely contains cookies that ensures fundamental functionalities and security measures of the web site. These cookies don’t retailer any private data.

Any cookies that will not be significantly needed for the web site to perform and is used particularly to gather consumer private knowledge through analytics, advertisements, different embedded contents are termed as non-necessary cookies. It’s obligatory to procure consumer consent prior to operating these cookies on your web site.

I’m organising my improvement surroundings, so I simply put in Windows Subsystem for Linux and it at all times appears to open a contemporary terminal in my Windows house listing – /mnt/c/Customers/dl and I am attempting to make it default to the linux house listing – /house/dl .

I checked to see what the house listing is within the Linux subsystem in /and many others/passwd and it’s accurately set:

Then I got here throughout this answer, nevertheless it would not appear to have any have an effect on:

I do know I can simply run cd ~ in my dot recordsdata (which is what I am at present utilizing), however I am searching for a approach the place /house/dl is simply the default and cd ~ is not wanted. Is that this potential?

9 Solutions 9

Trending type relies off of the default sorting technique — by highest rating — nevertheless it boosts votes which have occurred just lately, serving to to floor extra up-to-date solutions.

It falls again to sorting by highest rating if no posts are trending.

Swap to Trending type

It’s best to solely change the startingDirectory for WSL (Ubuntu on this case) terminal periods.

  1. Open settings.json through CTRL + SHIFT + ,
  2. Be sure you are modifying startingDirectory beneath profiles/record/identify: “Ubuntu”

Instance under (the slashes want to be escaped):

Documentation about startingDirectory together with default values and anticipated values.

Inside settings.json additionally, you will discover an evidence of the json schema which is right here

If you happen to want to understand how or the place to edit Windows Terminal settings/preferences: https://docs.microsoft.com/en-us/windows/terminal/get-started

Whereas this reply remains to be legitimate, Windows Terminal now has a pleasant dialog in which you’ll be able to edit these choices straight. For the windows house folder, chances are you’ll use: %USERPROFILE% . For superior settings, comparable to definition of instructions, I nonetheless want this technique. E.g., as described in command palette documentation.

I feel this reply is lacking one thing since I put in WSL2 and there’s no Windows Terminal put in within the system. And I actually don’t desire to set up it simply to repair this drawback. So this repair doesn’t work for me =/. Being extra exact: Utilizing CTRL + Shift + , does nothing on my WSL terminal, and looking out on windows for “Windows Terminal” yields no outcomes.

@Greenfly77 I’m glad to hear there may be an interface to configure this, I’ve moved again to the *nix world, so wouldn’t have the opportunity to reply my query. Maybe you need to put up a solution?

@Duncanmoo good suggestion. Ought to I add a brand new reply or edit/prolong yours to embody an outline of how to edit settings if Windows Terminal is put in as effectively?

In Windows 10 21H2 or later and Windows 11, it is now a lot less complicated. In accordance to the Microsoft Doc:

On newer variations of Windows, startingDirectory can settle for Linux-style paths.

Meaning you may merely use:

No want for any prefixes for Windows listing construction, nor escaped backslashes. Simply plain previous Linux forward-slash notation.

This works in each WSL1 and WSL2.

Be aware: I attempted to use “~” and it failed. There could also be a way to use , however have not tried it.

@justin, see the at present highest voted reply. If you happen to want to understand how or the place to edit Windows Terminal settings/preferences: docs.microsoft.com/en-us/windows/terminal/get-started

The opposite solutions right here (particularly the most recent one from @TomBoland) are nice for beginning in an arbitrary listing, however the instance in your query was to begin in your house listing. The best approach to do that’s merely to create or change the “commandline” property to wsl ~ . That is an undocumented flag to wsl.exe , and it have to be the primary argument (e.g. wsl ~ -u root ).

Present and Current Windows Terminal Releases

Since Windows Terminal now has a GUI for Settings, you may simply edit your profile to level to wsl ~ within the ->Common->Command Line setting.

Older Windows Terminal Releases, or if you would like to edit manually

In case you are enhancing your settings.json straight (at present present in %userprofilepercentAppDataLocalPackagesMicrosoftWindowsTerminal. LocalStatesettings.json , however this may increasingly change) .

Take away the “supply” attribute and substitute it with “commandline” :

Additionally, for the enjoyable of it, here is another (hacky) approach to open WSL to ~ / $HOME (with out hardcoding as with the opposite solutions). That is completely not wanted because it’s a lot simpler to use wsl ~ , however:

This begins up sh , adjustments the listing to $HOME , after which exec ‘s your $SHELL to substitute the sh .

It appears like nothing was discovered at this location. Possibly attempt a search?

Join with us

Right here you may subscribe to our channels. We now have Twittеr, YouTube, and Telegram, together with an RSS feed and E-mail publication.

We discontinued Fb to ship our put up updates.

Featured posts

Commercial

Not too long ago up to date

Pleasant Blogs

We use cookies on our web site to provide the most related expertise by remembering your preferences and repeat visits. By clicking “Settle for”, you consent to using ALL the cookies. Learn Extra

Privateness Overview

This web site makes use of cookies to enhance your expertise whilst you navigate via the web site. Out of those cookies, the cookies which can be categorized as needed are saved on your browser as they’re important for the working of fundamental functionalities of the web site. We additionally use third-party cookies that assist us analyze and perceive how you employ this web site. These cookies shall be saved in your browser solely with your consent. You even have the choice to opt-out of those cookies. However opting out of a few of these cookies could have an impact on your shopping expertise.

Essential cookies are completely important for the web site to perform correctly. This class solely contains cookies that ensures fundamental functionalities and security measures of the web site. These cookies don’t retailer any private data.

Any cookies that will not be significantly needed for the web site to perform and is used particularly to gather consumer private knowledge through analytics, advertisements, different embedded contents are termed as non-necessary cookies. It’s obligatory to procure consumer consent prior to operating these cookies on your web site.

Utilizing House Assistant to combine a Unifi Shield G4 Doorbell and Amazon Alexa to announce guests

I’m not a House Assistant professional, nevertheless it’s clearly a large and highly effective ecosystem. I’ve interviewed the creator of House Assistant on my podcast and I encourage you to take a look at that chat.

House Assistant can rapidly turn into a passion that overwhelms you. Each object (entity) in your home that’s even remotely related can turn into programmable. All the things. Even individuals! You’ll be able to declare that any identify:worth pair that (for instance) your telephone can expose may be consumable by House Assistant. Questions like “is Scott house” or “what’s Scott’s telephone battery” may be related to Scott the Entity within the House Assistant Dashboard.

I used to be amazed on the gadgets/objects that House Assistant found that it may automate. Lights, remotes, Spotify, and extra. You will discover that any internally related machine you may have probably has an Integration obtainable.

Temperature, Gentle Standing, certain, that is simple House Automation. However integrations and third get together code can provide you particulars like “Is the Dwelling Room darkish” or “is there movement within the driveway.” From these constructing blocks, you may then construct your personal IFTTT (If This Then That) automations, combining not simply two methods, however any and all disparate methods.

What’s one of the best half? This all runs LOCALLY. Not in a cloud or the cloud or anybody’s cloud. I’ve received my stuff operating on a Raspberry Pi 4. Even higher I put a Energy Over Ethernet (PoE) hat on my Rpi so I’ve only one community wire into my hub that powers the Pi.

I imagine organising House Assistant on a Pi is one of the best and easiest method to get began. That mentioned, you may as well run in a Docker Container, on a Synology or different NAS, or simply on Windows or Mac within the background. It is up to you. Optionally, you may pay Nabu Casa $5 for distant (outdoors your home) community entry through clear forwarding. However to be clear, all of it nonetheless runs inside your home and never within the cloud.

OK, to the primary level. I used to have an Amazon Ring Doorbell that may combine with Amazon Alexa and once you pressed the doorbell it will say “Somebody is on the entrance door” on our all Alexas. It was a stunning little integration that labored properly in our lives.

Nonetheless, I swapped out the Ring for a Unifi Shield G4 Doorbell for a variety of causes. I do not need to pump video to outdoors providers, so this doorbell integrates properly with my present Unifi set up and data video to an area arduous drive. Nonetheless, I lose any Alexa integration and this good little “somebody is on the door” announcement. So this looks like an ideal job for House Assistant.

This is the overall todo record:

  • Set up House Assistant
  • Set up House Assistant Neighborhood Retailer
    • This permits third get together “untrusted” integrations straight from GitHub. You will want a GitHub account and it will clone customized integrations straight into your native HA.
    • I additionally advocate the Terminal & SSH (9.2.2), File editor (5.3.3) add ons so you may see what’s taking place.
    • NOTE: Unifi Shield assist is being promoted in House Assistant v2022.2 so you will not want this step quickly because it’ll be included.
    • “The UniFi Shield Integration provides assist for retrieving Digicam feeds and Sensor knowledge from a UniFi Shield set up on both an Ubiquiti CloudKey+, Ubiquiti UniFi Dream Machine Professional or UniFi Shield Community Video Recorder.”
    • Authenticate and configure this integration.
    • This makes all your Alexas present up in House Assistant as “media gamers” and in addition permits you to tts (textual content to speech) to them.
    • Authenticate and configure this integration.

    I like to recommend going into your Alexa app and making a Multi-room Speaker Group known as “all over the place.” Not solely as a result of it is good to have the opportunity to say “play the music all over the place” however you may as well goal that “In all places” group in House Assistant.

    Go into your House Assistant UI at http://homeassistant.native:8123/ and into Developer Instruments. Underneath Companies, attempt pasting on this YAML and clicking “name service.”

    If that works, you realize you may automate Alexa and make it say issues. Now, go to Configuration, Automation, and Add a brand new Automation. This is mine. I used the UI to create it. Be aware that your Entity names could also be totally different should you give your entrance doorbell digicam a distinct identify.

    Discover the format of Information, it is identify worth pairs inside a single subject’s worth.

    . nevertheless it additionally exists in a file known as Automations.yaml. Be aware that the “to: ‘on'” set off is required otherwise you’ll get double bulletins, one for every state change within the doorbell.

    It really works! There is a ton of cool stuff I can automate now!

    Sponsor: Make login Auth0’s drawback. Not yours. Present the handy login options your clients need, like social login, multi-factor authentication, single sign-on, passwordless, and extra. Get began without cost.

    About Scott

    Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, marketing consultant, father, diabetic, and Microsoft worker. He’s a failed stand-up comedian, a cornrower, and a e book creator.

    It appears like nothing was discovered at this location. Possibly attempt a search?

    Join with us

    Right here you may subscribe to our channels. We now have Twittеr, YouTube, and Telegram, together with an RSS feed and E-mail publication.

    We discontinued Fb to ship our put up updates.

    Featured posts

    Commercial

    Not too long ago up to date

    Pleasant Blogs

    We use cookies on our web site to provide the most related expertise by remembering your preferences and repeat visits. By clicking “Settle for”, you consent to using ALL the cookies. Learn Extra

    Privateness Overview

    This web site makes use of cookies to enhance your expertise whilst you navigate via the web site. Out of those cookies, the cookies which can be categorized as needed are saved on your browser as they’re important for the working of fundamental functionalities of the web site. We additionally use third-party cookies that assist us analyze and perceive how you employ this web site. These cookies shall be saved in your browser solely with your consent. You even have the choice to opt-out of those cookies. However opting out of a few of these cookies could have an impact on your shopping expertise.

    Essential cookies are completely important for the web site to perform correctly. This class solely contains cookies that ensures fundamental functionalities and security measures of the web site. These cookies don’t retailer any private data.

    Any cookies that will not be significantly needed for the web site to perform and is used particularly to gather consumer private knowledge through analytics, advertisements, different embedded contents are termed as non-necessary cookies. It’s obligatory to procure consumer consent prior to operating these cookies on your web site.

    I’m organising my improvement surroundings, so I simply put in Windows Subsystem for Linux and it at all times appears to open a contemporary terminal in my Windows house listing – /mnt/c/Customers/dl and I am attempting to make it default to the linux house listing – /house/dl .

    I checked to see what the house listing is within the Linux subsystem in /and many others/passwd and it’s accurately set:

    Then I got here throughout this answer, nevertheless it would not appear to have any have an effect on:

    I do know I can simply run cd ~ in my dot recordsdata (which is what I am at present utilizing), however I am searching for a approach the place /house/dl is simply the default and cd ~ is not wanted. Is that this potential?

    9 Solutions 9

    Trending type relies off of the default sorting technique — by highest rating — nevertheless it boosts votes which have occurred just lately, serving to to floor extra up-to-date solutions.

    It falls again to sorting by highest rating if no posts are trending.

    Swap to Trending type

    It’s best to solely change the startingDirectory for WSL (Ubuntu on this case) terminal periods.

    1. Open settings.json through CTRL + SHIFT + ,
    2. Be sure you are modifying startingDirectory beneath profiles/record/identify: “Ubuntu”

    Instance under (the slashes want to be escaped):

    Documentation about startingDirectory together with default values and anticipated values.

    Inside settings.json additionally, you will discover an evidence of the json schema which is right here

    If you happen to want to understand how or the place to edit Windows Terminal settings/preferences: https://docs.microsoft.com/en-us/windows/terminal/get-started

    Whereas this reply remains to be legitimate, Windows Terminal now has a pleasant dialog in which you’ll be able to edit these choices straight. For the windows house folder, chances are you’ll use: %USERPROFILE% . For superior settings, comparable to definition of instructions, I nonetheless want this technique. E.g., as described in command palette documentation.

    I feel this reply is lacking one thing since I put in WSL2 and there’s no Windows Terminal put in within the system. And I actually don’t desire to set up it simply to repair this drawback. So this repair doesn’t work for me =/. Being extra exact: Utilizing CTRL + Shift + , does nothing on my WSL terminal, and looking out on windows for “Windows Terminal” yields no outcomes.

    @Greenfly77 I’m glad to hear there may be an interface to configure this, I’ve moved again to the *nix world, so wouldn’t have the opportunity to reply my query. Maybe you need to put up a solution?

    @Duncanmoo good suggestion. Ought to I add a brand new reply or edit/prolong yours to embody an outline of how to edit settings if Windows Terminal is put in as effectively?

    In Windows 10 21H2 or later and Windows 11, it is now a lot less complicated. In accordance to the Microsoft Doc:

    On newer variations of Windows, startingDirectory can settle for Linux-style paths.

    Meaning you may merely use:

    No want for any prefixes for Windows listing construction, nor escaped backslashes. Simply plain previous Linux forward-slash notation.

    This works in each WSL1 and WSL2.

    Be aware: I attempted to use “~” and it failed. There could also be a way to use , however have not tried it.

    @justin, see the at present highest voted reply. If you happen to want to understand how or the place to edit Windows Terminal settings/preferences: docs.microsoft.com/en-us/windows/terminal/get-started

    The opposite solutions right here (particularly the most recent one from @TomBoland) are nice for beginning in an arbitrary listing, however the instance in your query was to begin in your house listing. The best approach to do that’s merely to create or change the “commandline” property to wsl ~ . That is an undocumented flag to wsl.exe , and it have to be the primary argument (e.g. wsl ~ -u root ).

    Present and Current Windows Terminal Releases

    Since Windows Terminal now has a GUI for Settings, you may simply edit your profile to level to wsl ~ within the ->Common->Command Line setting.

    Older Windows Terminal Releases, or if you would like to edit manually

    In case you are enhancing your settings.json straight (at present present in %userprofilepercentAppDataLocalPackagesMicrosoftWindowsTerminal. LocalStatesettings.json , however this may increasingly change) .

    Take away the “supply” attribute and substitute it with “commandline” :

    Additionally, for the enjoyable of it, here is another (hacky) approach to open WSL to ~ / $HOME (with out hardcoding as with the opposite solutions). That is completely not wanted because it’s a lot simpler to use wsl ~ , however:

    This begins up sh , adjustments the listing to $HOME , after which exec ‘s your $SHELL to substitute the sh .

    It appears like nothing was discovered at this location. Possibly attempt a search?

    Join with us

    Right here you may subscribe to our channels. We now have Twittеr, YouTube, and Telegram, together with an RSS feed and E-mail publication.

    We discontinued Fb to ship our put up updates.

    Featured posts

    Commercial

    Not too long ago up to date

    Pleasant Blogs

    We use cookies on our web site to provide the most related expertise by remembering your preferences and repeat visits. By clicking “Settle for”, you consent to using ALL the cookies. Learn Extra

    Privateness Overview

    This web site makes use of cookies to enhance your expertise whilst you navigate via the web site. Out of those cookies, the cookies which can be categorized as needed are saved on your browser as they’re important for the working of fundamental functionalities of the web site. We additionally use third-party cookies that assist us analyze and perceive how you employ this web site. These cookies shall be saved in your browser solely with your consent. You even have the choice to opt-out of those cookies. However opting out of a few of these cookies could have an impact on your shopping expertise.

    Essential cookies are completely important for the web site to perform correctly. This class solely contains cookies that ensures fundamental functionalities and security measures of the web site. These cookies don’t retailer any private data.

    Any cookies that will not be significantly needed for the web site to perform and is used particularly to gather consumer private knowledge through analytics, advertisements, different embedded contents are termed as non-necessary cookies. It’s obligatory to procure consumer consent prior to operating these cookies on your web site.

    Utilizing House Assistant to combine a Unifi Shield G4 Doorbell and Amazon Alexa to announce guests

    I’m not a House Assistant professional, nevertheless it’s clearly a large and highly effective ecosystem. I’ve interviewed the creator of House Assistant on my podcast and I encourage you to take a look at that chat.

    House Assistant can rapidly turn into a passion that overwhelms you. Each object (entity) in your home that’s even remotely related can turn into programmable. All the things. Even individuals! You’ll be able to declare that any identify:worth pair that (for instance) your telephone can expose may be consumable by House Assistant. Questions like “is Scott house” or “what’s Scott’s telephone battery” may be related to Scott the Entity within the House Assistant Dashboard.

    I used to be amazed on the gadgets/objects that House Assistant found that it may automate. Lights, remotes, Spotify, and extra. You will discover that any internally related machine you may have probably has an Integration obtainable.

    Temperature, Gentle Standing, certain, that is simple House Automation. However integrations and third get together code can provide you particulars like “Is the Dwelling Room darkish” or “is there movement within the driveway.” From these constructing blocks, you may then construct your personal IFTTT (If This Then That) automations, combining not simply two methods, however any and all disparate methods.

    What’s one of the best half? This all runs LOCALLY. Not in a cloud or the cloud or anybody’s cloud. I’ve received my stuff operating on a Raspberry Pi 4. Even higher I put a Energy Over Ethernet (PoE) hat on my Rpi so I’ve only one community wire into my hub that powers the Pi.

    I imagine organising House Assistant on a Pi is one of the best and easiest method to get began. That mentioned, you may as well run in a Docker Container, on a Synology or different NAS, or simply on Windows or Mac within the background. It is up to you. Optionally, you may pay Nabu Casa $5 for distant (outdoors your home) community entry through clear forwarding. However to be clear, all of it nonetheless runs inside your home and never within the cloud.

    OK, to the primary level. I used to have an Amazon Ring Doorbell that may combine with Amazon Alexa and once you pressed the doorbell it will say “Somebody is on the entrance door” on our all Alexas. It was a stunning little integration that labored properly in our lives.

    Nonetheless, I swapped out the Ring for a Unifi Shield G4 Doorbell for a variety of causes. I do not need to pump video to outdoors providers, so this doorbell integrates properly with my present Unifi set up and data video to an area arduous drive. Nonetheless, I lose any Alexa integration and this good little “somebody is on the door” announcement. So this looks like an ideal job for House Assistant.

    This is the overall todo record:

    • Set up House Assistant
    • Set up House Assistant Neighborhood Retailer
      • This permits third get together “untrusted” integrations straight from GitHub. You will want a GitHub account and it will clone customized integrations straight into your native HA.
      • I additionally advocate the Terminal & SSH (9.2.2), File editor (5.3.3) add ons so you may see what’s taking place.
      • NOTE: Unifi Shield assist is being promoted in House Assistant v2022.2 so you will not want this step quickly because it’ll be included.
      • “The UniFi Shield Integration provides assist for retrieving Digicam feeds and Sensor knowledge from a UniFi Shield set up on both an Ubiquiti CloudKey+, Ubiquiti UniFi Dream Machine Professional or UniFi Shield Community Video Recorder.”
      • Authenticate and configure this integration.
      • This makes all your Alexas present up in House Assistant as “media gamers” and in addition permits you to tts (textual content to speech) to them.
      • Authenticate and configure this integration.

      I like to recommend going into your Alexa app and making a Multi-room Speaker Group known as “all over the place.” Not solely as a result of it is good to have the opportunity to say “play the music all over the place” however you may as well goal that “In all places” group in House Assistant.

      Go into your House Assistant UI at http://homeassistant.native:8123/ and into Developer Instruments. Underneath Companies, attempt pasting on this YAML and clicking “name service.”

      If that works, you realize you may automate Alexa and make it say issues. Now, go to Configuration, Automation, and Add a brand new Automation. This is mine. I used the UI to create it. Be aware that your Entity names could also be totally different should you give your entrance doorbell digicam a distinct identify.

      Discover the format of Information, it is identify worth pairs inside a single subject’s worth.

      . nevertheless it additionally exists in a file known as Automations.yaml. Be aware that the “to: ‘on'” set off is required otherwise you’ll get double bulletins, one for every state change within the doorbell.

      It really works! There is a ton of cool stuff I can automate now!

      Sponsor: Make login Auth0’s drawback. Not yours. Present the handy login options your clients need, like social login, multi-factor authentication, single sign-on, passwordless, and extra. Get began without cost.

      About Scott

      Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, marketing consultant, father, diabetic, and Microsoft worker. He’s a failed stand-up comedian, a cornrower, and a e book creator.

      I put in the WSL Bash on Windows 10 and set my consumer to e.g. ‘abc’ however now I would like to change it to one thing else.

      How can I alter the consumer identify of the consumer I am logged in as?

      After I open bash it robotically logs me in with my present consumer.

      As of now, Ubuntu 20.04 is present. After its put in utilizing WSL 2, the ubuntu2004 command turns into obtainable to be used: ubuntu2004 config –default-user robert

      For individuals who did not put in through retailer (e.g through export/import): github.com/microsoft/WSL/points/3974#issuecomment-576782860. Default consumer may be modified by making a /and many others/wsl.conf file

      Thanks a lot @SebastianHoffmann, this remark is what made me realise that it was all due to the import. Thought after I exported that all the things can be an actual copy, however I assume not.

      Eight Solutions 8

      Now that LxRun.exe is deprecated, should you set up Ubuntu from the Windows retailer the command you have to to run at a windows command immediate is

      (Be aware: relying on which model you put in this could possibly be ubuntu1804.exe or ubuntu2004.exe )

      If you happen to’re utilizing WSL2, you are achieved.

      For WSL1, you will want to additionally restart LxssManager service

      ubuntu would possibly NOT be your default, it relies upon which model you put in so verify the solutions under, as mine is “ubuntu1804 config . “

      as an alternative of setting the default consumer it opened bash for me. It doesn’t appear to be working for some cause. I’m on the most recent launch of Windows as of in the present day

      With WSL 2 in use, it was not required to restart the LxSSManager service for the container to use the change

      The highest reply ( ubuntu config –default-user root ) is at present right for the default occasion. However you probably have a number of cases, you want to work barely tougher:

      Contained in the occasion, as root, create/edit /and many others/wsl.conf and add these traces:

      Then shut it, run wsl –terminate in PowerShell, and restart it.

      That is from a problem within the WSL repo. The registry hack reply can also be in there, however /and many others/wsl.conf is now formally the supported answer.

      All different solutions have been useful, however may be different situations too, observe right here as per yours. Mine was Ubuntu 16.04, so I used the next:

      If you happen to put in Ubuntu 18.04:

      If you happen to used the default one, then:

      Ought to this not change the present username to the username I present in ? After I do this it simply tells me the username I’m offering doesn’t exist. That is on 18.0.4

      You’ll be able to change the default consumer for bash by operating the next command in a traditional command immediate (cmd.exe):

      If you happen to’re operating Ubuntu 18.04 from the Microsoft Retailer, the command (powershell or cmd) shall be:

      In CMD

      See which distros you may have put in wslconfig /l

      I’ve Ubuntu and I needed to set the default consumer to root ubuntu config –default-user root

      ubuntu was not acknowledged by cmd.exe (Windows 10 / WSL Ubuntu 20.04), so the options above didn’t work for me.

      What labored for me (from Windows terminal):

      That is the proper answear, as a result of it’s altering the username, not the consumer itself. Additionally, should you get the message that username cannot be modified as a result of a course of is operating, simply sudo kill processId

      Outdated query that received bumped in the present day, however the solutions want updating and consolidating to be present (and proper).

      There are two elements to the query, and each reply right here to date simply covers one or the opposite.

      How can I alter the consumer identify of the consumer I am logged in as?

      As @PJ127 accurately identified, step one is to truly change the username inside Ubuntu. This could most simply be achieved (now, in 2021) by exiting WSL and beginning PowerShell, then:

      Then there’s the second a part of the query, which is what a lot of the solutions right here try to cowl:

      After I open bash it robotically logs me in with my present consumer

      There are a number of methods of doing this, however the Microsoft beneficial/documented technique in 2021 is as @Jacktose answered:

      In your WSL occasion, sudo editor /and many others/wsl.conf with the next contents:

      Exit, then from PowerShell, wsl –terminate and restart WSL.

      Whereas the ubuntu.exe –config technique will work, there are two issues:

      It isn’t at all times “ubuntu.exe”. The identify of the executable (technically “app execution alias”) relies upon on which model you put in from the Retailer. Ubuntu has are available a number of Retailer packages through the years. There is a bundle for every supported launch (e.g. ubuntu2004.exe , and many others.) and one for the “present” model ( ubuntu.exe ). And whereas that is Ask Ubuntu, it additionally could possibly be alpine.exe , and many others. if you’re utilizing a distinct distribution.

      It additionally, as has been identified in different solutions, doesn’t work you probably have multiple occasion put in (which is a superb function of WSL). It’ll solely work for the primary, store-installed occasion.

      Then, in fact, there are registry-based strategies of adjusting the default identify, however since we’ve got safer, supported strategies let’s not even cowl these right here. 🙂