Bash

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 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 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…

How to Add or Remove Open Linux shell here context menu 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.

This is primarily a tool for developers — especially web developers and those who work on or with open source projects. This allows those who want/need to use Bash, common Linux tools (sed, awk, etc.) and many Linux-first tools (Ruby, Python, etc.) to use their toolchain on Windows.

WSL provides an application called Bash.exe that, when started, opens a Windows console running the Bash shell. Using Bash, you can run command-line Linux tools and apps.

Bash is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distros, and in macOS. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.

Starting in Windows 10 build 17672, a new Open Linux shell here context menu is available when you have Windows Subsystem for Linux (WSL) enabled and installed a Linux distro app.

By default, the Open Linux shell here context menu is only available when you press and hold the Shift key and right click or press and hold on a folder or drive.

This tutorial will show you how to add or remove the Open Linux shell here context menu for all users when Windows Subsystem for Linux (WSL) is enabled in Windows 10.

Read more…

How to Add ‘Open Bash window here as administrator’ context menu in Windows 10

Microsoft first made investments that improve cmd, PowerShell, and many other command-line tools and developer scenarios. Second Microsoft decided to grow their command line family by adding real, native Bash and with it support for Linux command-line tools which run directly on Windows in an environment that behaves like Linux!

Starting with Windows 10 Insider Preview Build 14316, you can natively run Bash in Windows. BASH is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distro’s, and in OSX. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.

You can now run Bash scripts, Linux command-line tools like sed, awk, grep, and you can even try Linux-first tools like Ruby, Git, Python, etc. directly on Windows. You can also access your Windows filesystem from within Bash allowing you to work on the same set of files using your preferred Windows tools or Linux command-line tools.

This tutorial will show you how to add or remove Open Bash window here as administrator to the context menu for all users in Windows 10.

Read more…

How to Add ‘Open Bash window here’ context menu in Windows 10

Microsoft first made investments that improve cmd, PowerShell, and many other command-line tools and developer scenarios. Second Microsoft decided to grow their command line family by adding real, native Bash and with it support for Linux command-line tools which run directly on Windows in an environment that behaves like Linux!

Starting with Windows 10 Insider Preview Build 14316, you can natively run Bash in Windows. BASH is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distro’s, and in OSX. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.

You can now run Bash scripts, Linux command-line tools like sed, awk, grep, and you can even try Linux-first tools like Ruby, Git, Python, etc. directly on Windows. You can also access your Windows filesystem from within Bash allowing you to work on the same set of files using your preferred Windows tools or Linux command-line tools.

This tutorial will show you how to add or remove Open Bash window here to the context menu for all users in Windows 10.

Read more…

How to Create a Bash on Ubuntu on Windows 10 shortcut

Microsoft first made investments that improve cmd, PowerShell, and many other command-line tools and developer scenarios. Second Microsoft decided to grow their command line family by adding real, native Bash and with it support for Linux command-line tools which run directly on Windows in an environment that behaves like Linux!

Starting with Windows 10 Insider Preview Build 14316, you can natively run Bash in Windows. BASH is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distro’s, and in OSX. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.

You can now run Bash scripts, Linux command-line tools like sed, awk, grep, and you can even try Linux-first tools like Ruby, Git, Python, etc. directly on Windows. You can also access your Windows filesystem from within Bash allowing you to work on the same set of files using your preferred Windows tools or Linux command-line tools.

This tutorial will show you how to create or download a Bash on Ubuntu on Windows shortcut in Windows 10.

Read more…