Linux – Windows Blog by Brink

Linux

How to Remove User from Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

When you add a user to a WSL distro, this new user will not be a member of the sudo (aka: administrator) group by default.

This tutorial will show you how to remove a user from a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Switch User in Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

If you like, you can switch to a specified user at any time in a WSL distro console.

This tutorial will show you how to switch between users in a Windows Subsystem for Linux (WSL) distro console in Windows 10.

Read more…

How to Set Default User for Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

The default user for a WSL distro is the user that is automatically signed in by default when you run the WSL distro.

You can set the default user for a WSL distro to root (aka: built-in Administrator) or any available user for that WSL distro.

See also: Linux User Account and Permissions | Microsoft Docs

This tutorial will show you how to set a default user for a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Add, Remove, and List Sudo Users in Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

When you add a user to a WSL distro, this new user will not be a member of the sudo (aka: administrator) group by default.

This tutorial will show you how to add, remove, and list users of the sudo group in a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to List Users in Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

This tutorial will show you how to list the user names of all user accounts in a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Add User to Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

This tutorial will show you how to add a new user to a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Access Linux Files in a Windows Subsystem for Linux (WSL) Distro from Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

In the past, creating and changing Linux files from Windows resulted in losing files or corrupting data. Making this possible has been a highly requested and long anticipated feature.

Starting with Windows 10 build 18342, Microsoft added the ability for users to access Linux files in a WSL distro from Windows 10. These files can be accessed through the command line, and also Windows apps, like File Explorer, VSCode, etc. can interact with these files.

Linux files for a running WSL distro are located at \\wsl$\.

This tutorial will show you how to access all the Linux files of a Windows Subsystem for Linux (WSL) distro from Windows 10.

Read more…

How to Update and Upgrade Windows Subsystem for Linux (WSL) Distro Packages in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

Most WSL distros ship with an empty/minimal package catalog. It is strongly recommend to regularly update your package catalog, and upgrading your installed packages using your distro’s preferred package manager.

Windows 10 does not automatically update or upgrade your Linux distro(s) packages.

This tutorial will show you how to update and upgrade your Windows Subsystem for Linux (WSL) distro packages in Windows 10.

Read more…

How to Change User Password in Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

When you open a new distro instance, you won’t be prompted for your password, but if you elevate a process using sudo, you will need to enter your password, so make sure you choose a password you can easily remember.

If you have access to your Linux user account and know your current password, you can change it using Linux password reset tools of that distribution — most likely passwd.

If that’s not an option, depending on the distribution, you may be able to reset your password by resetting the default user.

This tutorial will show you how to change the password of a user in a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Reset User Password in Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and export and import WSL distros.

The first time a newly installed WSL distro runs, a Console window will open, and you’ll be asked to wait for a minute or two for the installation to complete.

Once installation is complete, you will be prompted to create a new user account (and its password).

Creating your Linux user is the first step in setting up a new Linux distribution on WSL. The first user account you create is automatically configured with a few special attributes:

  1. It is your default user — it signs-in automatically on launch.
  2. It is Linux administrator (a member of the sudo group) by default.

Each Linux distribution running on the Windows Subsystem for Linux has its own Linux user accounts and passwords. You will have to configure a Linux user account any time you add a distribution, reinstall, or reset. Linux user accounts are not only independent per distribution, they are also independent from your Windows 10 user account.

When you open a new distro instance, you won’t be prompted for your password, but if you elevate a process using sudo, you will need to enter your password, so make sure you choose a password you can easily remember.

If you have access to your Linux user account and know your current password, you can change it using Linux password reset tools of that distribution — most likely passwd.

If that’s not an option, depending on the distribution, you may be able to reset your password by resetting the default user.

WSL offers a default user tag to identify which user account automatically logs in when you start a WSL. Since many distributions include commands to set the default user to root and also a root user with no password set, changing the default user to root is a handy tool for things like password reset.

This tutorial will show you how to reset the password of a user in a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Unregister and Reset Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store.

When you run a WSL distro app installed from the Microsoft Store for the first time, it gets installed and setup for your account by having you enter a UNIX username and password to use for this WSL distro.

If needed, you can unregister a WSL distro to reset it back to default for your account. Once unregistered, all data, settings, and software associated with that distribution will be permanently lost. The unregistered WSL distro will be removed from the available WSL distros list.

When you run the unregisted WSL distro app next, a clean copy of the distro will be installed allowing you to also setup the distro with a new UNIX username and password.

Starting with Windows 10 build 18342 (19H1) and Windows 10 build 18836 (20H1), Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

This tutorial will show you how to unregister and reset a Windows Subsystem for Linux (WSL) distro to default settings for your account in Windows 10.

Read more…

How to Install Windows Subsystem for Linux (WSL) Distros in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can install WSL distro apps from the Microsoft Store, and import WSL distros.

This tutorial will show you how to install and setup Windows Subsystem for Linux (WSL) distro apps from the Microsoft Store for your account in Windows 10.

Read more…

How to Run a Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

When you have Windows Subsystem for Linux (WSL) enabled, you can run the default WSL distro or a specified WSL distro to send commands to.

Starting with Windows 10 build 18342 (19H1) and Windows 10 build 18836 (20H1), Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

This tutorial will show you different ways to run a Windows Subsystem for Linux (WSL) distro in Windows 10.

Read more…

How to Set Default Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

The default WSL distribution is the one that runs when you run wsl on a command line.

Starting with Windows 10 build 18342 (19H1) and Windows 10 build 18836 (20H1), Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

This tutorial will show you how to set a default Windows Subsystem for Linux (WSL) distro for your account in Windows 10.

Read more…

How to Terminate Running Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

Starting with Windows 10 build 18836 version 1903, Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

–terminate or –t has been added to wsl.exe that will immediately terminate a running installed or imported WSL distro.

This tutorial will show you how to terminate a running Windows Subsystem for Linux (WSL) distro for your account in Windows 10.

Read more…

How to List All Running Windows Subsystem for Linux (WSL) Distros in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

Starting with Windows 10 build 18836 version 1903, Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

–list or –l has been added to wsl.exe that lists all distributions available for the current user. You could use –running with –list to see all currently running installed or imported WSL distros.

This tutorial will show you how to see a list of names of all currently running Windows Subsystem for Linux (WSL) distros for your account in Windows 10.

Read more…

How to List All Available Windows Subsystem for Linux (WSL) Distros in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

Starting with Windows 10 build 18836 version 1903, Microsoft added some new commands that will give you more functionality when using wsl.exe. The commands that existed inside of wslconfig.exe have been added to wsl.exe to allow you to configure your distros more easily.

–list or –l has been added to wsl.exe that lists all distributions available for the current user. These would be all installed or imported WSL distros.

This tutorial will show you how to see a list of names for all installed and imported Windows Subsystem for Linux (WSL) distros available for your account in Windows 10.

Read more…

How to Add or Remove Linux in Navigation Pane of File Explorer in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

Starting with Windows 10 build 18836 version 1903, Linux will be added to the navigation pane in File Explorer whenever you enable Windows Subsystem for Linux (WSL).

If you like, you can remove Linux from the navigation without having to disable WSL.

This tutorial will show you how to add or remove Linux in the navigation pane of File Explorer for your account in Windows 10. When you click/tap on the Distro shortcut in Linux, it will show all currently running WSL distros.

Read more…

How to Export and Import Windows Subsystem for Linux (WSL) Distro in Windows 10

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

Starting with Windows 10 build 18836 version 1903, Microsoft added some new commands that will give you more functionality when using wsl.exe.

You can now export and import different WSL distros. Exporting a distro is accomplished by passing in –export as an argument and will output a tar file of your current distro. For example, you could use this functionality to share your distro setup with other people. Additionally, if you pass in –import as an argument you can import a tar file that contains the root file system of a Linux distro, which allows you to import any distro you’d like (with any configuration you’d like) as a new distro.

This tutorial will show you how to export and import Windows Subsystem for Linux (WSL) distros in Windows 10.

Read more…